Re: VB with SQL Server... Unable to create temp table using ADO connection object
From: Dejan Sarka (dejan_please_reply_to_newsgroups.sarka_at_avtenta.si)
Date: 05/06/04
- Next message: Vishal Parkar: "Re: exec into?"
- Previous message: Vishal Parkar: "Re: select 1 as one into #tbllookup .What this will do"
- In reply to: Peri: "VB with SQL Server... Unable to create temp table using ADO connection object"
- Next in thread: Peri: "Re: VB with SQL Server... Unable to create temp table using ADO connection object"
- Reply: Peri: "Re: VB with SQL Server... Unable to create temp table using ADO connection object"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 6 May 2004 13:47:29 +0200
My guess is that you have connection pooling, so even if you close the
connection from the app, it is still in the pool and alive. So the global
temp table is not destroyed, and when you try to create next time, the
creation fails.
-- Dejan Sarka, SQL Server MVP Associate Mentor Solid Quality Learning More than just Training www.SolidQualityLearning.com "Peri" <lperi@CSPL.com> wrote in message news:eyCkDh1MEHA.620@TK2MSFTNGP10.phx.gbl... > Hi, > > This is the connection string I am using: > > objConn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security > Info=False;User ID=sa;Initial Catalog=FormsDevp;Data Source=CSPL;Use > Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation > ID=PERI;Use Encryption for Data=False;Tag with column collation when > possible=False" > > I tried using all the 3 sql statements given below. > objConn.Execute "SELECT * INTO ##TempScrip7569 FROM [FormsDevp]..Scrip WHERE > 1=2" > OR > objConn.Execute "SELECT * INTO ##TempScrip7569 FROM Scrip WHERE 1=2" > OR > objConn.Execute "SELECT * INTO ##TempScrip7569 FROM Scrip WHERE ScripCode IS > NULL" > > But I am not able to create a temp table with the same structure of the > original table "Scrip" with empty records. > > Suprisingly, If I run the same query in the SQL Server query analyser, I am > able to see the temp table. > > FYI - Reference to the Project - Microsoft ActiveX Data Objects 2.5 Library. > > Can any one help me to overcome this ? > > Thanks and Regards, > > Peri > >
- Next message: Vishal Parkar: "Re: exec into?"
- Previous message: Vishal Parkar: "Re: select 1 as one into #tbllookup .What this will do"
- In reply to: Peri: "VB with SQL Server... Unable to create temp table using ADO connection object"
- Next in thread: Peri: "Re: VB with SQL Server... Unable to create temp table using ADO connection object"
- Reply: Peri: "Re: VB with SQL Server... Unable to create temp table using ADO connection object"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|