At 11:16 PM 2/04/2007, you wrote: >What is the main reason to use transactions?
Because in a transactional database (which Firebird is) you can't avoid it. Everything happens in a transaction, such that the work that you are doing is isolated from what everyone else is doing. >Currently I just use a fbcommand statement to execute some sql statement. >I am curious does this way auto commit? >If I do use transactions can someone sent a sample code for a basic select >transaction. There is no such thing as "a basic select transaction". A transaction is an insulated wrapping around a unit of work. SELECT is a data manipulation language (DML) statement requesting an operation on one or more tables - in this case, to retrieve a set of rows. Other DML operations are INSERT, UPDATE, DELETE and EXECUTE PROCEDURE. You can do all of these things inside a single transaction. Until you commit the transaction, only your transaction can see the results. Everyone else in the network is also doing his or her own thing inside his or her own little cocoon. The database engine keeps an omnipotent eye on what everyone is doing and prevents you from walking on one another's patches. Helen ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Firebird-net-provider mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
