Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A clean way to do this - join cursor with SQL
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00543385
Message ID:
00543393
Vues:
15
Hi Mark,

You need a ## to create a global temporary table. From Books On Line (the Create Table topic):
Global temporary tables are automatically dropped when the session that created the table ends and all other tasks have stopped referencing them. The association between a task and a table is maintained only for the life of a single Transact-SQL statement. This means that a global temporary table is dropped at the completion of the last Transact-SQL statement that was actively referencing the table when the creating session ended.

Cheers,

Andrew

>Hi Andrew,
>
>Is that temporary table available ONLY to that user (connection)?
>
>Thanks, I'll look into the # and ## symbols.
>
>
>
>>I do something similar to this by creating a temprary table on the SQL Server. The table exists only as long as the connection that created it. In all other respects, it's a standard table. The way to create it is to use the # sign at the start of the table name (or perhaps it's two # signs - you'd better confirm that. One way the table lasts as long as the connection's open, the other one is more short-lived).
>
>>You can INSERT INTO the temporary table and use it in SQL statements etc.
>
>Cheers,
>
>Andrew
>
>>We're converting our VFP app to a dbc-less VFP -> SQL Server application. On one of the forms, during a data entry session, the user adds new customers. One requirement is to keep track of the customer records added during the data entry session so that the user can go back to any of those records during the session. The implementation before was to store the keys in a cursor, then when the user wanted to see a list of those they added during the session we'd do a SELECT joining that cursor with the customer table.
>>
>>Now, using SQL passthru (no DBC, so no views) any suggestions how to provide that same functionality? We've discusses a number of ideas, but looking for other suggestions. We don't want to bring down the entire customer table from SQL with passthru.
>>
>>Thanks.


If we were to introduce Visual FoxBase+, would we be able to work from the dotNet Prompt?


From Top 22 Developer Responses to defects in Software
2. "It’s not a bug, it’s a feature."
1. "I thought I fixed that."


All my FoxTalk and other articles are available on my web site.


Unless specifically identified otherwise, anthing posted here is purely my opinion and may or may not reflect the policies or practices of Microsoft.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform