Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Views
Message
De
01/07/2003 17:36:53
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
SQL Views
Divers
Thread ID:
00805855
Message ID:
00805855
Vues:
70
Is anyone aware of the capability of creating a parameterized SQL view that allow a common view to be executed with a passed variable that controls the scope of the records placed in the cursor...
... or does anyone know of a workaround that would mimic that functionality ?

The basic problem is to allow the script below to be executed with the entries in the cursor determined by the variable immediately following WHERE.

TIA
Bill


CREATE SQL VIEW um REMOTE CONNECTION sqlWinMAGI AS ;
SELECT Um.UM, Um.[DESC], Um.NODECIMALS;
FROM dbo.UM Um WHERE &tcSqlWhere (could be 1=1, um = "EA", etc.)

DBSetProp("um","View","SendUpdates",.T.)
DBSetProp("um","View","BatchUpdateCount",1)
DBSetProp("um","View","CompareMemo",.T.)
DBSetProp("um","View","FetchAsNeeded",.F.)
DBSetProp("um","View","FetchMemo",.T.)
DBSetProp("um","View","FetchSize",-1)
DBSetProp("um","View","MaxRecords",-1)
DBSetProp("um","View","Prepared",.F.)
DBSetProp("um","View","ShareConnection",.F.)
DBSetProp("um","View","AllowSimultaneousFetch",.F.)
DBSetProp("um","View","UpdateType",1)
DBSetProp("um","View","UseMemoSize",255)
DBSetProp("um","View","Tables","dbo.UM")
DBSetProp("um","View","WhereType",1)

DBSetProp("um"+".um","Field","DataType","C(4)")
DBSetProp("um"+".um","Field","UpdateName","dbo.UM.UM")
DBSetProp("um"+".um","Field","KeyField",.T.)
DBSetProp("um"+".um","Field","Updatable",.T.)

DBSetProp("um"+".desc","Field","DataType","C(30)")
DBSetProp("um"+".desc","Field","UpdateName","dbo.UM.[DESC]")
DBSetProp("um"+".desc","Field","KeyField",.F.)
DBSetProp("um"+".desc","Field","Updatable",.T.)

DBSetProp("um"+".nodecimals","Field","DataType","L")
DBSetProp("um"+".nodecimals","Field","UpdateName","dbo.UM.NODECIMALS")
DBSetProp("um"+".nodecimals","Field","KeyField",.F.)
DBSetProp("um"+".nodecimals","Field","Updatable",.T.)
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform