Using #Temp tables

Results 1 to 4 of 4

Thread: Using #Temp tables

  1. #1
    Troy Guest

    Default Using #Temp tables

    I am trying to use #temp tables with a MS/SQL 7.0 database <BR>I am having problems of not nowing how to detect if the temp table still exist. I tried using cookies but they seem to not work very well.<BR><BR>any help you can give, very much appreciated

  2. #2
    J P Guest

    Default RE: Using #Temp tables

    Are you calling the table from a stored proc?

  3. #3
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: Using #Temp tables

    RTFM about temp tables<BR><BR>a temp table will get deleted automatically after the connectin closes unless there is connection pooling<BR><BR>if you call a SP the table gets dropped after the Sp executes<BR><BR>there is no need for you to sit checking if the table exists.<BR><BR>What have cookies got to do with Temp tables.<BR><BR>Are you pooling connections. If you are then no biggy just drop the table after you finich with it.<BR><BR>The best way would be to create and drop temp tables in the SP itself

  4. #4
    Troy Guest

    Default RE: Using #Temp tables

    I am using MSSQL 7.0<BR><BR>Here is a snippet of code that I have tried but does not work<BR><BR>strQuery = " create table #temp (prod_id int, prod_name varchar(10)"<BR>set objRS = objConn.Execute(strQuery)<BR><BR>the problem is that is the user reloads the page then I get a message the the table already exists. I was trying to use cookies to determine if the table already exist and just delete the contents of the table and insert new data based on a query.<BR><BR>I was unsuccesful. I&#039m sure that there is a way to do it but I can&#039t seem to figure it out.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts