Re: begin works and commit works in storeprocs
Posted in 1997
Jake There are situations where issuing the begin/commit work inside the procedure is acceptable. These situations would most likely occur when you want to process large numbers of rows from different tables and the client app is accessing the db over a network. In this case you may want to break the transaction down into smaller pieces of work to reduce the chance of a failure due to a long transaction. I certainly would not want to do this type of processing on a row by row basis, transfering records across the net each time! To handle situations where the client app has already issued the BEGIN statement you could always put the BEGIN in an exception block, trap the error and turn transaction handling off inside the procedure using a flag variable. Mark MarkDenham@aol.com (home) Denham.M@amstr.com (work)