|
 |
asp_database_setup thread: Accessing SQL Server temporary table via successive pages
Message #1 by "Shawn Clabough" <shawnc@u...> on Wed, 8 May 2002 22:27:28
|
|
I'm trying to create and then access a temporary table in SQL Server via
multiple successive ASP pages, but the connection I open is getting
closed (and hence the temporary table deleted) once I try to go to the
next page.
I am not explicitly closing the connection I open for the temporary table
and I'm checking for it's existence before creating it again. I'm also
using a separate connection for all access to the temporary table vs.
access to the permanent tables.
Has anyone been able to connect to a temporary table via multiple pages?
Or am I stuck using a permanent temp table and cleaning it out on the
Session_OnEnd?
Shawn
Message #2 by "Ken Schaefer" <ken@a...> on Thu, 9 May 2002 13:51:15 +1000
|
|
A temp table goes out-of-scope when the connection is closed. There is good
documentation on this in Books Online (Start | Program Files | Microsoft SQL
Server | Books Online)
Could we ask what you're using this temp table for? Perhaps there is a
better way to architect your system.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Shawn Clabough" <shawnc@u...>
Subject: [asp_database_setup] Accessing SQL Server temporary table via
successive pages
: I'm trying to create and then access a temporary table in SQL Server via
: multiple successive ASP pages, but the connection I open is getting
: closed (and hence the temporary table deleted) once I try to go to the
: next page.
:
: I am not explicitly closing the connection I open for the temporary table
: and I'm checking for it's existence before creating it again. I'm also
: using a separate connection for all access to the temporary table vs.
: access to the permanent tables.
:
: Has anyone been able to connect to a temporary table via multiple pages?
: Or am I stuck using a permanent temp table and cleaning it out on the
: Session_OnEnd?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #3 by "Shawn Clabough" <shawnc@u...> on Thu, 9 May 2002 17:19:54
|
|
Thanks, I do understand that closing a connection loses the temp table.
What I'm doing this for is a multi-page form for someone to fill-out and
submit. For each page, I store the information in a non-global temporary
table. Once they complete the form, I'm transferring the information
into the permanent table.
Shawn
> A temp table goes out-of-scope when the connection is closed. There is
good
documentation on this in Books Online (Start | Program Files | Microsoft
SQL
Server | Books Online)
Could we ask what you're using this temp table for? Perhaps there is a
better way to architect your system.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Shawn Clabough" <shawnc@u...>
Subject: [asp_database_setup] Accessing SQL Server temporary table via
successive pages
: I'm trying to create and then access a temporary table in SQL Server via
: multiple successive ASP pages, but the connection I open is getting
: closed (and hence the temporary table deleted) once I try to go to the
: next page.
:
: I am not explicitly closing the connection I open for the temporary
table
: and I'm checking for it's existence before creating it again. I'm also
: using a separate connection for all access to the temporary table vs.
: access to the permanent tables.
:
: Has anyone been able to connect to a temporary table via multiple pages?
: Or am I stuck using a permanent temp table and cleaning it out on the
: Session_OnEnd?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #4 by "Ken Schaefer" <ken@a...> on Fri, 10 May 2002 11:56:26 +1000
|
|
How about persisting the variables in HTML hidden form elements (or
cookies), and then putting the whole thing into the database at the end.
Seems like much less overhead...
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Shawn Clabough" <shawnc@u...>
Subject: [asp_database_setup] Re: Accessing SQL Server temporary table via
successive pages
: Thanks, I do understand that closing a connection loses the temp table.
: What I'm doing this for is a multi-page form for someone to fill-out and
: submit. For each page, I store the information in a non-global temporary
: table. Once they complete the form, I'm transferring the information
: into the permanent table.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
 |