ExecuteStatementWithoutResult
Darren Comeau edited this page Oct 14, 2018
·
1 revision
Will execute the SQL statement against the database. Will not return any results to the caller.
public void ExecuteStatementWithoutResult(string sqlStatement);
Parameters
sqlStatement
String
The SQL statement you wish to execute against the database.
// Setup the Database Tester object using the MS SQL implementation
var connectionstring = @"Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=tempdb;Integrated Security=SSPI;";
VulcanAnalytics.DBTester.DatabaseTester tester = new VulcanAnalytics.DBTester.MsSqlDatabaseTester(connectionstring);
// Parameters for ExecuteStatementWithoutResultmethod
var sqlStatement = "CREATE SCHEMA [test];";
// Call the ExecuteStatementWithoutResult method to execute the SQL statement
tester.ExecuteStatementWithoutResult(sqlStatement);
Assert.IsTrue(tester.HasSchema("test"));