473,385 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Clearing temp tables

//using C# 2005, MS SQL 2000(prod) and SQL Express 2005 (dev)

My sprocs all have a clearing mechanism at the end like this for each temporary table I use:
--drop temporary tables
IF EXISTS(SELECT name FROM [DBNAME]..sysobjects WHERE name = N'#Temp' AND xtype='U')
DROP TABLE #Temp

Every once in a while, something will happen to cause a hiccup and the table doesn't clear. The result is no results, not an error message (reader fails). I added the same code to the beginning of the procedure and it helped, but I didn't think that a temp table would persist in sysobjects. This happens from within using blocks in C# and I'm "sure" the connection is closed in code anyway.

Is this a known issue? I didn't really find anything similar in the msdn2 or sql areas.

TIA

_E
Dec 26 '07 #1
1 2435
This turned out to be a symptom of a mis-configured server with a linked server. The RPC settings were not turned on, so were not cleared in a timely fashion if the connection was severed/halted.
Jan 10 '08 #2

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

Similar topics

3
by: Subodh | last post by:
I've written a SP which does some complex calculations and in the end dumps data into 2 tables (master & detail) When I run this sp for smaller no of IDS (employees i.e for 13000 in Master and...
18
by: Niels | last post by:
Hi group, I have some problems with clearing floated divs. My usual method works fine in Konqueror, but not in Firefox. Here's an example: <html><body> <div id='left' style='float:left;...
3
by: imani_technology_spam | last post by:
We were trying to remove duplicates and came up with two solutions. One solution is similar to the one found in a book called "Advanced Transact-SQL for SQL Server 2000" by Ben-Gan & Moreau. This...
5
by: Jay | last post by:
Hey there, I have a question. Is it possible to to construct something through a combination of php and javascript that (when a browser window is closed) would drop temp tables that are used? I've...
21
by: Boris Popov | last post by:
Hello pgsql-general, I'm trying to implement a table with rows that are automatically deleted when the session that inserted them disconnects, sort of like our own alternative to...
0
by: PD | last post by:
I am trying to stream out a PDF file via the response object and when I execute the code it always brings up the first document that I pulled up.Even when I step through the code, I can see the new...
1
by: asdf | last post by:
I just started my first project where i draw lines and strings on the screen. I sucessfully drew what i needed on the screen, then realized that when it updated it just drew over the same area w/o...
1
by: serge | last post by:
I am running SQL Server Best Practices on a SQL 2000 database and it is recommending me to change the temp tables inside SPs to table variables. I had read already in other places to use table...
4
by: robert d via AccessMonster.com | last post by:
When my app starts up, it creates a temporary database. This temp database is created from a 'model' database that is in the same folder as the application. Because there is a model, the creation...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.