Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is the scope of a SQL Server session for Temp table
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Database:
MS SQL Server
Divers
Thread ID:
01147315
Message ID:
01147318
Vues:
19
This message has been marked as the solution to the initial question of the thread.
Assuming that you're refering to the local temp tables (#TemTable), their scope is a session. A session is created when connection is established. Each connection creates its own session. A local temp table is released when session ends. You can delete it with DROP TABLE statement at any time.
In addition, temp tables created inside SP are released at the end of SP execution. The same is true for EXECUTE statement and sp_executesql system SP.

>I have been asking help from all of you regarding temp tables, here is another one.
>
>What is a session and the scope of the session in VFP terms. I have a bit of code that is creating temp tables, there is a point in it where it errors, but the app is definately running as the error is handled. Now I try to goto Query Analyser and try to check out the erroring part of SQL statement, hoping that the other successfully created temp tables will be available for testing purposes, but they are not.
>
>- Are they gone because the prg ended (not the app it is still running)?
>- Or VFP has it's own session and Query Analyser it own?
>- Error or not, will temp tables go away as soon as the prg / form / class which created it goes out of VFP scope?
>- Will the temp tables stay until the app exits?
>
>Please advise.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform