|
 |
asp_database_setup thread: ADO transaction- timeout expired error
Message #1 by "Jeba Singh" <icheck@s...> on Mon, 21 May 2001 15:22:48
|
|
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 edit/delete/add record), 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 should be rollbacked.
I am using a SQL-Server database.
I have used ADO transaction methods(Begintrans/commit/rollback trans) for
this. But when more than one users are using the above pages, they are
getting the Sql-server- Timeout expired error. Please help me with this.
Thanx in Advance.
Dharma.
Message #2 by Hal Levy <hal.levy@s...> on Mon, 21 May 2001 10:31:41 -0400
|
|
I would gamble that you have instantiated your ADO connection at the
application level.
Don't do that.
Don't change it to sessions.
Store the data in a temporary holding table and when they commit it- move it
to the "real" tables. Trying to maintain the transaction over multiple pages
by making a session or application connection is frowned upon.
Hal Levy
StarMedia Network, Inc.
Intranet Development Manager
-----Original Message-----
From: Jeba Singh [mailto:icheck@s...]
Sent: Monday, May 21, 2001 11:23 AM
To: ASP Database Setup
Subject: [asp_database_setup] ADO transaction- timeout expired error
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 edit/delete/add record), 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 should be rollbacked.
I am using a SQL-Server database.
I have used ADO transaction methods(Begintrans/commit/rollback trans) for
this. But when more than one users are using the above pages, they are
getting the Sql-server- Timeout expired error. Please help me with this.
Thanx in Advance.
Dharma.
Message #3 by "Jeba Singh" <icheck@s...> on Tue, 22 May 2001 09:57:13
|
|
Hi Hal Levy!
Thanks for your reply. AS you have rigthly guessed, I have kept the
connection at the session level. But don't you think that storing in the
temporary table also takes lot of resource? I am not bothered about the
scalability/performance. Since at the maximum 4 users are expected at the
same time. I have completed the code. If I have to store it in temp table,
then I have to do a lot of code. Please help me with the ADO transaction.
Thanx again.
Dharma.
> I would gamble that you have instantiated your ADO connection at the
> application level.
> Don't do that.
>
> Don't change it to sessions.
>
> Store the data in a temporary holding table and when they commit it-
move it
> to the "real" tables. Trying to maintain the transaction over multiple
pages
> by making a session or application connection is frowned upon.
>
>
> Hal Levy
> StarMedia Network, Inc.
> Intranet Development Manager
Message #4 by Hal Levy <hal.levy@s...> on Tue, 22 May 2001 10:19:41 -0400
|
|
Jeba,
Session level or Application level?
If you are at the application level then you have a lock condition. While a
transaction is in progress (user 1) the connection can not service the
second transaction (User 2). While waiting for User 1 to finish- user 2 will
time out. This is absolute- without recoding there is no way around this.
If you are at the session level, forgetting the _*HUGE*_ reasons not to, I
would expect that the locking issue would not take place. I am not sure why
the second user is timing out- Since each session has it's own connection. I
wonder what database your using- perhaps the system can not handle multiple
transactions at the same time- I am not a huge user of transactions,
especially in the database (I use MTS), so I can't be sure.
Do yourself a favor- and re-code the system in a way that doesn't violate
basic ASP principles, you will be happy you did.
Hal Levy
StarMedia Network, Inc.
Intranet Development Manager
-----Original Message-----
From: Jeba Singh [mailto:icheck@s...]
Sent: Tuesday, May 22, 2001 5:57 AM
To: ASP Database Setup
Subject: [asp_database_setup] RE: ADO transaction- timeout expired error
Hi Hal Levy!
Thanks for your reply. AS you have rigthly guessed, I have kept the
connection at the session level. But don't you think that storing in the
temporary table also takes lot of resource? I am not bothered about the
scalability/performance. Since at the maximum 4 users are expected at the
same time. I have completed the code. If I have to store it in temp table,
then I have to do a lot of code. Please help me with the ADO transaction.
Thanx again.
Dharma.
|
|
 |