Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems finding record via view
Message
De
05/07/2007 21:07:01
 
 
À
05/07/2007 19:50:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01238131
Message ID:
01238144
Vues:
10
Here is the code
CREATE SQL VIEW "V_DOCUMENTOS" ; 
   AS SELECT * FROM datos!documentos WHERE Documentos.codigo = ?vcCodigo   AND Documentos.documento = ?vcDocumento

DBSetProp('V_DOCUMENTOS', 'View', 'UpdateType', 1)
DBSetProp('V_DOCUMENTOS', 'View', 'WhereType', 3)
DBSetProp('V_DOCUMENTOS', 'View', 'FetchMemo', .T.)
DBSetProp('V_DOCUMENTOS', 'View', 'SendUpdates', .T.)
DBSetProp('V_DOCUMENTOS', 'View', 'UseMemoSize', 255)
DBSetProp('V_DOCUMENTOS', 'View', 'FetchSize', 100)
DBSetProp('V_DOCUMENTOS', 'View', 'MaxRecords', -1)
DBSetProp('V_DOCUMENTOS', 'View', 'Tables', 'datos!documentos')
DBSetProp('V_DOCUMENTOS', 'View', 'Prepared', .F.)
DBSetProp('V_DOCUMENTOS', 'View', 'CompareMemo', .T.)
DBSetProp('V_DOCUMENTOS', 'View', 'FetchAsNeeded', .F.)
DBSetProp('V_DOCUMENTOS', 'View', 'FetchSize', 100)
DBSetProp('V_DOCUMENTOS', 'View', 'Comment', "")
DBSetProp('V_DOCUMENTOS', 'View', 'BatchUpdateCount', 1)
DBSetProp('V_DOCUMENTOS', 'View', 'ShareConnection', .F.)

*!* Field Level Properties for V_DOCUMENTOS
* Props for the V_DOCUMENTOS.id field.
DBSetProp('V_DOCUMENTOS.id', 'Field', 'KeyField', .T.)
DBSetProp('V_DOCUMENTOS.id', 'Field', 'Updatable', .T.)
DBSetProp('V_DOCUMENTOS.id', 'Field', 'UpdateName', 'datos!documentos.id')
DBSetProp('V_DOCUMENTOS.id', 'Field', 'DataType', "N(10)")
* Props for the V_DOCUMENTOS.documento field.
DBSetProp('V_DOCUMENTOS.documento', 'Field', 'KeyField', .F.)
DBSetProp('V_DOCUMENTOS.documento', 'Field', 'Updatable', .T.)
DBSetProp('V_DOCUMENTOS.documento', 'Field', 'UpdateName', 'datos!documentos.documento')
DBSetProp('V_DOCUMENTOS.documento', 'Field', 'DataType', "N(1)")
* Props for the V_DOCUMENTOS.codigo field.
DBSetProp('V_DOCUMENTOS.codigo', 'Field', 'KeyField', .F.)
DBSetProp('V_DOCUMENTOS.codigo', 'Field', 'Updatable', .T.)
DBSetProp('V_DOCUMENTOS.codigo', 'Field', 'UpdateName', 'datos!documentos.codigo')
DBSetProp('V_DOCUMENTOS.codigo', 'Field', 'DataType', "C(15)")
* Props for the V_DOCUMENTOS.fecha field.
DBSetProp('V_DOCUMENTOS.fecha', 'Field', 'KeyField', .F.)
DBSetProp('V_DOCUMENTOS.fecha', 'Field', 'Updatable', .T.)
DBSetProp('V_DOCUMENTOS.fecha', 'Field', 'UpdateName', 'datos!documentos.fecha')
DBSetProp('V_DOCUMENTOS.fecha', 'Field', 'DataType', "D")
and this is how I run it from the form
vcCodigo=LTRIM(THIS.text2.VALUE)
vcDocumento=1 
		
SELEC v_documentos
REQUERY('v_documentos')
SCATTER NAME THIS.RegistroMemento
BROWSE
TIA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform