Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Philosophical issue of SPT vs Views...
Message
De
05/09/2001 14:35:06
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Philosophical issue of SPT vs Views...
Divers
Thread ID:
00552723
Message ID:
00552723
Vues:
52
For VFP apps that access SQL Server, are there any documents on the Wiki (or anywhere else on this forum) that covers the pros and cons of SPT vs Remote Views ( vs Stored Procs)?

I am still in the 'learning' stage, but it just seems to me (and I may be horribly oversimplifying things) that one could do an entire VFP production app with SPT and without ever utilizing a view. I realize it's a bit more code, but just 'seems' like it's the way to go.



A 2nd question, dealing with macro substitution in Stored Procedures...many of our queries use macro substitution, like follows:

SELECT &cFieldList FROM &cFileList WHERE &cWhere INTO CURSOR ResultSet GROUP BY &cOrderBy

It took me a little while to figure out how to do this with SPT, but I believe what eventually worked was...

nQueryResult = SQLEXEC(nMyConn, 'SELECT ' + [&cFieldList] + ' FROM ' + [&cFileList] + ' WHERE ' + [&cWhere] + ' GROUP BY ' + [&cGroupBy],"ResultSet")

My 2nd question is whether T-SQL in Stored Procs supports anything like this.

TIA,
Kevin
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform