February 22, 2010 at 8:18 am
Hi All,
I created an application (VB.NET) using SMO. This application acts like SQL Server Analyzer.
My problem is that I'm trying to use temp table but I'm having no joy.
When I execute the following:
select * into #Temp from tblPrinters
select * from #Temp
My data is displayed. However, if I then execute
select * from #Temp
I get an error that the object does not exists. How do I continue to have access to the temp table until I drop it.
Thanks
Alex
February 22, 2010 at 8:37 am
temp tables are designed to be removed automatically when they fall out of scope.
I suggest you create a non temp table, if you wish to delete it when you are finished.
February 22, 2010 at 8:44 am
But how do I keep in in scope? With DMO, this was not an issue, it worked just like the SQL QA. There mus be a way to keep my temp table until I drop it.
February 22, 2010 at 9:41 am
Alexander-623609 (2/22/2010)
But how do I keep in in scope? With DMO, this was not an issue, it worked just like the SQL QA. There mus be a way to keep my temp table until I drop it.
Show us your VB.net/SMO code, please.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy