Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Querying data between SQL Server and VFP...
Message
De
23/08/2001 11:57:04
 
 
À
22/08/2001 23:14:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00547774
Message ID:
00548063
Vues:
10
Kevin,

Instead of sending the full list of accounts and items to the server, just call the SP once for each account/item, store the results and then display them or whatever.

Also, if you use an async connection you can send the command as the user select the accounts/items.

HTH,
BOb


>For a front-end VFP application that is utilizing SQL Server, what is the best strategy for constructing a stored procedure where a history file is being queries for many accounts and many items?
>
>For example, let's say I have an INVOICE table in SQL Server that has both an account and product column. A user, at run-time, may want to see a report on inovices for 20 accounts and 100 items....or maybe 10 accounts and 2 items, etc.
>
>So the VFP app interface allows the user to select the 20 accts and 100 items...and let's say they're sitting in two VFP cursors called TMPACCTS and TMPITEMS. What is the most effective way to 'get' these two cursors into SQL server so that a stored procedure can do a join between INVOICE, TMPACCTS, and TMPITEMS?
>
>Only way I've figured out is to create a temp table in SQL Server (#TMPACCTS and #TMPITEMS), use SQLEXEC to insert the 20 accts and 100 items that the user selected, and then run the stored proc between my INVOICE table and the two #TMP files. This 'works', but I don't know if that's a good practice, since hundreds of users could be doing the same thing.
>
>There's probably some fundamental command or strategy I'm missing...
>
>TIA,
>Kevin
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform