Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Free tables vs DBC
Message
De
14/01/2003 15:16:10
 
 
À
13/01/2003 15:57:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00740632
Message ID:
00741598
Vues:
19
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform