|
-
Aug 7th, 2007, 09:53 PM
#1
Thread Starter
Member
Temporary Table
Hi,
I use VB2005 as front-end, SQL Server as backend. Can we do create temporary table as "Create table #username ....................."?
when the user log off the program, then the temp table will be removed automatically, similar create temporary table in Query Analyzer, when close Query Analyzer, the temp table is removed.
-
Aug 7th, 2007, 09:57 PM
#2
Re: Temporary Table
To drop a table you have to execute a DROP TABLE statement. Presumably the authors of Query Analyzer have implemented the functionality to execute that statement for you. In your project you're the author, so it's up to you to implement that functionality.
-
Aug 7th, 2007, 09:57 PM
#3
Hyperactive Member
Re: Temporary Table
The tables I create that I don't need get a "Drop tablename" after I'm done with them.
Visual Studio .NET 2005/.NET Framework 2.0
-
Aug 8th, 2007, 03:48 AM
#4
Re: Temporary Table
I don't know why you're asking. You could have tried this yourself.
Anyway, temporary tables are automatically dropped when they go out of scope (when you close the connection), although you can drop them yourself before that point if you want.
To create a temporary table you need the CREATE TABLE privilege.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|