From: Pierre A. <pie...@op...> - 2003-10-06 14:57:40
|
Carlos Guzman Alvarez wrote: > Try this: > > FbTransaction transaction = connection.BeginTransaction(); > > string sql = "CREATE TABLE A(F1 INTEGER NOT NULL, F2 INTEGER NOT NULL);" > + "ALTER TABLE A ADD CONSTRAINT PK_A PRIMARY KEY (F1, F2);"; > > FbCommand command = new FbCommand(sql, connection, transaction); > > FbDataReader reader = command.ExecuteReader(); > while (reader.NextResult()) > { > } > > reader.Close(); > transaction.Commit(); It crashes on the second call to NextResult, at FbCommand.cs:588, with commandText == null. The 'if (commandText.Length > 0)' can not execute; if I replace it with : if ((commandText != null) && (commandText.Length > 0)) then it works. Can you please fix this ? And I still do not understand why calling reader.Read() would crash ? Pierre |