General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only