Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Free tables vs DBC
Message
From
14/01/2003 15:16:10
 
 
To
13/01/2003 15:57:47
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00740632
Message ID:
00741598
Views:
18
The following is a portion of the code we use to create views programmatically. Use of a temporary DBC will be necessary.

Research the following...

* lcSql is equal to a paramatarized Sql Statement
CREATE SQL VIEW (lcView) AS &lcSql

llResult = CURSORSETPROP("SendUpdates", THIS.lSendUpdates) AND ;
CURSORSETPROP("Buffering", THIS.nBuffering) AND ;
CURSORSETPROP("CompareMemo", THIS.lCompareMemo) AND ;
CURSORSETPROP("BatchUpdateCount", THIS.nBatchCount)

* only perform the following if updating the table
GO BOTTOM
GO TOP
IF llResult AND THIS.lSendUpdates
* Go bottom to ensure we have all records, then place pointer back at the top
IF EMPTY(THIS.cUpdatableFieldList)
THIS.cStoreUpdatableFieldList = THIS.GetUpdatable()
ELSE
THIS.cStoreUpdatableFieldList = THIS.cUpdatableFieldList
ENDIF
llResult = CURSORSETPROP("UpdatableFieldList", THIS.cStoreUpdatableFieldList)

IF llResult
THIS.cKeyFieldList = THIS.getKeyFieldList()
ENDIF
IF llResult AND !EMPTY(THIS.cKeyFieldList)
llResult = CURSORSETPROP("KeyFieldList", THIS.cKeyFieldList)
ENDIF
IF llResult AND !EMPTY(THIS.cTables)
llResult = CURSORSETPROP("Tables", THIS.cTables)
ENDIF
IF llResult AND !EMPTY(THIS.cUpdateNameList)
llResult = CURSORSETPROP("UpdateNameList", THIS.cUpdateNameList)
ENDIF
ENDIF
Gordon de Rouyan
DC&G Consulting
Edmonton, Alberta
Email: derouyag@shaw.ca
Previous
Reply
Map
View

Click here to load this message in the networking platform