Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Views
Message
From
01/07/2003 17:36:53
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SQL Views
Miscellaneous
Thread ID:
00805855
Message ID:
00805855
Views:
67
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.)
Next
Reply
Map
View

Click here to load this message in the networking platform