|
 |
asp_databases thread: Increase Connection Time for a temporary table.
Message #1 by "Bryan Jackson" <bryan@k...> on Wed, 25 Sep 2002 21:54:35
|
|
I am saving my customers products in a temporary table while they
continue to shop. The problem is My temporary table only last for less
than a minute if not used. How can I increase my connection time via ASP,
so that it won't close until the time I set?
Here is what I currently have on my ASP page:
------------------------------------------------------
set rsCART = Server.CreateObject("ADODB.Recordset")
sqlCART = "CREATE TABLE ##" & CUST_ID & " (CUST_ID varchar(20), ITEM
varchar(50), SIZE varchar(10), QTY int, PRICE money, TOTAL money)"
rsCART.Open sqlCART,cart
------------------------------------------------------
The 'cart' connection stays open until I close it later, but the timeout
of the connection must be less than 60 seconds I guess. I tried this:
------------------------------------------------------
cart.ConnectionTimeout = 900
cart.Open
cart.CommandTimeout = 900
------------------------------------------------------
But It didn't work.
Any help will be greatly appreciated.
Thanks,
Bryan
Message #2 by John Pirkey <mailjohnny101@y...> on Wed, 25 Sep 2002 13:49:04 -0700 (PDT)
|
|
dont store it in the tempdb database. we had a similar problem, and just created
the table in the main database, as opposed to the tempdb - problem went away. just
be sure to clean up in the session_onend event, otherwise your DB will fill up
really quick.
sqlCART = "CREATE TABLE " & CustID ...
...
just a thought,
john
--- Bryan Jackson <bryan@k...> wrote:
> I am saving my customers products in a temporary table while they
> continue to shop. The problem is My temporary table only last for less
> than a minute if not used. How can I increase my connection time via ASP,
> so that it won't close until the time I set?
>
> Here is what I currently have on my ASP page:
> ------------------------------------------------------
> set rsCART = Server.CreateObject("ADODB.Recordset")
>
> sqlCART = "CREATE TABLE ##" & CUST_ID & " (CUST_ID varchar(20), ITEM
> varchar(50), SIZE varchar(10), QTY int, PRICE money, TOTAL money)"
>
> rsCART.Open sqlCART,cart
> ------------------------------------------------------
> The 'cart' connection stays open until I close it later, but the timeout
> of the connection must be less than 60 seconds I guess. I tried this:
> ------------------------------------------------------
> cart.ConnectionTimeout = 900
> cart.Open
> cart.CommandTimeout = 900
> ------------------------------------------------------
> But It didn't work.
>
> Any help will be greatly appreciated.
>
> Thanks,
> Bryan
=====
----------------------------
John Pirkey
MCSD
http://www.stlvbug.org
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
|
|
 |