Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Philosophical issue of SPT vs Views...
Message
De
05/09/2001 15:03:43
 
 
À
05/09/2001 14:35:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00552723
Message ID:
00552740
Vues:
19
Kevin,

Check out the following:

http://fox.wikis.com/wc.dll?Wiki~RemoteViews~VFP
http://fox.wikis.com/wc.dll?Wiki~MoreOnRemoteViews
http://fox.wikis.com/wc.dll?Wiki~SQLPass-Through

Personally, I prefer to use SPT over RVs. I use a wrapper that allows me to convert an SPT cursor into an updatable view. This has the advantage that no DBC is required. As far as macro substitution is concerned, you don't need it when using SPT. You can build your SQL statement as follows:
nQueryResult = SQLEXEC(nMyConn, 'SELECT ' + cFieldList + ' FROM ' + cFileList + ' WHERE ' + cWhere + ' GROUP BY ' + cGroupBy, "ResultSet")
HTH
>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
Daniel
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform