|
-
Feb 27th, 2003, 08:54 AM
#1
Thread Starter
Lively Member
when to close the connection and transaction?
hi,
my question is about the right place where I should close a connection and commit/rellback a transaction
a page look like this
...
try
dim conn as sqlclient.sqlconnection(...)
conn.open()
... define a transaction
... do database operations with the connection & transaction
... end of the operations
... commit the transaction
conn.close()
catch ex as exception
...if I try to rolback & close the transaction, it seems that those are not available here
finally
...same (connection seems to not be available here)
end try
did I close the connection in the reght place?
what is happening when something fail: when the connection will be closed, and when I can rollback the transaction?
thank you,
svatasoiu
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|