|
-
May 22nd, 2001, 03:55 AM
#1
Thread Starter
Hyperactive Member
SQL_server timeout problem...
Hi there!
I have 10 ASP pages, (all use the same database-but each page using a different table in the database). After going through all the 10 pages(where the user can add/edit/delete records), the user is redirected to a page, which contains 'Commit' and 'Cancel' butttons. If the user clicks the Commit button, all the information enetered in those forms needs to be committed. On the other hand if he chooses the Cancel button, all the information entered in those 10 pages should be rollbacked.
I am using a SQL-Server7.0 database. Also I have used ADO begintrans/Committrans/Rollbacktrans methods. In order to use this, I am keeping the ADO connection in the session.
Here is the code, I have used to set up the connection in Global.asa
Sub Session_OnStart()
'setting the connection
set con=server.CreateObject("ADODB.Connection")
con.CursorLocation=2 'adUseServer
con.Mode=3 'adModeReadWrite
con.IsolationLevel=&H00000100 'adXactReadUncommitted
con.Open "dsn=MyDSN;UID=sa;PWD=;"
set session("con")=con
End Sub
However, I am having the following problem:
* One user accesses Table A via Form A
* At the same time, a second user is accessing Table A via the same form
* When any one of them tries to update Table A via Form A, the user gets the following error.
Microsoft OLE DB Provider for ODBC Drivers error '80040e31'
[Microsoft][ODBC SQL Server Driver]Timeout expired
I think this occurs because the underlying table is locked. Anyway I don't have a clear idea. Please help me with, what connection string/Isolation level or anyother settings to be given to avoid this error.
Thanx in Advance.
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
|