From: Alan M. <al...@me...> - 2003-06-15 10:35:36
|
Jason, Don't forget that even a select statement needs to be committed since it will start a trasnaction whether you like it or not. I know there's no change but it still need to be committed. Alan > -----Original Message----- > From: fir...@li... > [mailto:fir...@li...]On Behalf Of > Jason Vene > Sent: Sunday, 15 June 2003 7:08 PM > To: fir...@li... > Subject: [Firebird-net-provider] Question: Why must I have a transaction > object supplied for command object? > > > Here's the situation: > > I want to perform a simple SELECT * FROM SALES, read > the data and still be able to use the open connection > to continue reading. > > I'm developing simultainous versions of the app using > both FbConnection/FbCommand/FbReader and > SqlConnection/SqlCommand/SqlReader from application > level objects that abstract to them. > > When I perform the "ExecutReader" on the command with > SqlCommand, I can do that without supplying a > SqlTransaction object, and continue to use the > connection on subsequent readers and such. > > With FbCommand, however, it throws an exception if the > transaction isn't supplied (which the source clearly > shows it requires, without option). > > This means I can't use the connection until that > transaction is committed or rolled back. I can't > commit the transaction, because there's nothing to > commit - I'm only reading the data. I can't rollback > either, both throw exceptions. > > Related to this question, I'm downloading the mono C# > compiler tools, but I wondered how (and perhaps why > not) I might build the source for the .NET provider > within VS.NET2003? I want to pull out the exception > throw when transaction is found to be null - I don't > quite understand any reason the transaction is always > required. > > Perhaps there's something else about this I simply > don't understand. > > Many thanks...... > > Jason > > > __________________________________ > Do you Yahoo!? > SBC Yahoo! DSL - Now only $29.95 per month! > http://sbc.yahoo.com > > > ------------------------------------------------------- > This SF.NET email is sponsored by: eBay > Great deals on office technology -- on eBay now! Click here: > http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 > _______________________________________________ > Firebird-net-provider mailing list > Fir...@li... > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider |