From: mailmur <ma...@ya...> - 2003-10-06 09:43:05
|
[slightly offtopic comment] This is what I've always found MSSQLServer to be one of the best dbserver atm. It can run an arbitrary script queries just fine through a normal executequery commands. Firebird cannot run simple compound queries such as "INSERT... ; UPDATE...;" in one go through executequery. > >> I'd like to do the following using a single > FbCommand object : > >> > >> "CREATE TABLE Test(ID INTEGER NOT NULL, > >> REV INTEGER NOT NULL, > >> DATA VARCHAR(100) CHARACTER > SET UNICODE_FSS); > >> > >> ALTER TABLE Test ADD CONSTRAINT PK_TEST PRIMARY > KEY (ID, REV);" > [...] > > You have two ways use the FbScript class, or use > FbCommand.ExecuteReader > > and FbDataReader.NextResult. > > Well, FbScript is not an option, since it does not > have the IDbCommand > interface. I'd like to be able to define the > parameters for my multiple > commands once, then let it execute everything in one > call. > > The second solution, using ExecuteReader, almost > works. It feels strange > to have to use it, since both commands above don't > return any results. > Moreover, if I do : > > for (;;) > { > while (reader.Read ()) > { > ... > } > if (! reader.NextResult ()) break; > } > > Then I get an exception on "Read", telling me > "invalid request handle". > If I drop the reader.Read (), then it will be OK. > > Why do I get an invalid request handle if the > command has not produced > any results ? I'd rather expect Read to return > false. > > > Which version of the .NET Provider are you using > ?? > > I am using assembly version 1.5.1333.25082. __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com |