Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursorsetprop()
Message
De
06/12/2007 20:49:22
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Cursorsetprop()
Divers
Thread ID:
01273815
Message ID:
01273815
Vues:
81
Update: Found the problem.......In UpdateNameList I'm pointing back to the cursor instead of the base table.

I'm working some some tables in MySQL. In the init of my form I have
lnConHandle = oMySqlData.db_connect("rlp_spotlight")
SET MULTILOCKS ON
=SQLEXEC(lnConHandle,"SELECT * FROM prodattrib WHERE uniq_key = ?Uniq_key","zcrsProdAttrib")
aa=CURSORSETPROP("Buffering",3,"zcrsProdAttrib") ----> aa = .T.

TEXT TO updNameList NOSHOW 
UNIQ_KEY zcrsProdAttrib.UNIQ_KEY, PART_NO zcrsProdAttrib.PART_NO, ......  && etc. more fields
ENDTEXT 
		
TEXT TO updFldList NOSHOW 
UNIQ_KEY, PART_NO, ...... && etc. more fields
ENDTEXT 

bb=CURSORSETPROP("Tables", 'rlp_spotlight.prodattrib', 'zcrsProdAttrib') ----> bb = .T.
bb=CURSORSETPROP("UpdateNameList", updNameList, 'zcrsProdAttrib')  ----> bb = .T.
bb=CURSORSETPROP("UpdatableFieldList", updFldList, 'zcrsProdAttrib')  ----> bb = .T.
bb=CURSORSETPROP("SendUpdates", .t., 'zcrsProdAttrib')  ----> bb = .T.
In the form's cmdSave button I have the following code
SELECT zcrsProdAttrib
IF NOT TABLEUPDATE()
     =AERROR(abcd)
     =MESSAGEBOX(abcd[2]) 
ENDIF
The error message from abcd is
"No update tables are specified. Use the Tables property of the cursor."

I adapted this code from another section of the application (not written by me). There is a difference in that piece of code doesn't use any buffering. It creates the connection, pulls down a cursor, does the four lines where I store the result to bb, appends records to the cursor, and closes the connection.

Any help and advice on how get what I need is greatly apprecieated.

TIA to all............Rich
Répondre
Fil
Voir

Click here to load this message in the networking platform