From: Pierre A. <pie...@op...> - 2003-11-11 18:20:11
|
Hello Carlos, I am still using the same code as I was on October 6th as I reported and proposed a fix, since following code crashed: command.CommandType = System.Data.CommandType.Text; command.CommandText = "CREATE TABLE A(F1 INTEGER NOT NULL, F2 INTEGER NOT NULL);" + "ALTER TABLE A ADD CONSTRAINT PK_A PRIMARY KEY (F1, F2);"; command.Transaction = my_transaction; reader = command.ExecuteReader (); for (;;) { while (reader.Read ()) { System.Console.Out.WriteLine ("{0} columns found.", reader.FieldCount); } if (reader.NextResult () == false) { break; } } reader.Close (); This does no longer work. I have a crash in FbCommand.cs, at line 537, while executing the second loop in my for(;;) block, on reader.NextResult. The call trace is: FbCommand.InternalPrepare FbCommand.NextResult FbDataReader.NextResult What happens, is that in FbCommand.cs: namedParameters = search.Matches(this.commands[actualCommand]); I have actualCommand == 2, this.commands[2] == null, and the regex 'search.Matches(null)' cannot be used ! This throws an exception (Value cannot be null). What is the best way to fix this ? Add a test to whether the argument is null, or shouldn't this code get executed ? Kind regards. Pierre |