By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,856 Members | 2,149 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,856 IT Pros & Developers. It's quick & easy.

Global Temp Table (with .NET)

P: 1
I have a procedure that creates the global temp table (##temp) inside a procedure which is populated with data when it is run for the first time. And when the procedure is executed second time, it uses that temp table instead of loading it all over.

The trouble I am having is that when I execute the procedure from Asp.NET the temp table stays there as long as i call the same procedure, but as soon as I call another procedure the temp table gets deleted even if I use the same object to execute the procedure.

Hope someone can help me in this. I dont know what is happening in here, I am lost.

Thanks In advance, hope to hear from you guys soon.

Sep 20 '08 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 1,017
Global temp table stays in memory for as long as at least one connection is opened to it. If you create a table and disconnect and another connection tries to read data from the same table but a little later table is already out of scope or no longer exists.

Hope it explained your problem.
Create a permanent table and just empty or reload it whenever needed.

Good Luck.
Sep 20 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.