Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
When does the table used in SQL SELECT close?
Message
De
20/12/2001 12:06:25
 
 
À
20/12/2001 11:57:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00596837
Message ID:
00596848
Vues:
37
>When using a SQL statement, does the database and/or the table need to be explicitly opened first (USE myTable, OPEN myDatabase ?), or does the SQL SELECT statement automatically opens up myTable?
>Another question:
>After a SQL SELECT statement, when does the table close?
>Example: SELECT * FROM myTable INTO CURSOR xTemp
>myTable automatically opens?
>When does myTable close: do I need to specifically close it:
>SELECT myTable
>USE

Yes, or you can issue
USE IN myTable
rather than explicitly switching work areas. If a SQL Select creates a filtered view rather than a separate cursor, you may end up destroying access to the cursor by closing the base table; you can avoid this by issuing a NOFILTER clause in the SQL Select if you expect that the query operates against a single table and is fully Rushmore optimizable.

>... what is a good practice: after SQL SELECT statement, manually close myTable & use xTemp cursor??
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform