I'm building tables, and combining all the statements for a table into one command with semicolons terminating each command. This worked fine with the ODBC drivers, but I get the above error message when I use the coreLab driver.
The code is:
oCmd.CommandText =
"CREATE TABLE Payments ( " +
"PaymentsKey GUID PRIMARY KEY, " +
"LastUpdate TIMESTAMP NOT NULL, " +
"PaymentAmount NUMERIC(11,2) NOT NULL, " +
"PaymentType INTEGER NOT NULL, " +
"PaymentNumber VARCHAR(20) NOT NULL, " +
"DocPaidKey GUID NOT NULL ); " +
"CREATE INDEX PayTrans ON Payments(TransactionsKey); " +
"CREATE INDEX PayDoc ON Payments(DocPaidKey, PaymentsKey); ";
oCmd.ExecuteNonQuery();
Should I be using something other than the CommandText, ExecuteNonQuery() combination?
Thanks