Article ID: 138094
Article Last Modified on 3/14/2005
************************** Beginning of code ******************
** This example is using SQL Server as the back-end.
** Your back-end server may vary.
Handle = SQLCONNECT("SQL421","sa","")
IF handle<0
WAIT WINDOW "connection not made"
CANCEL
ELSE
=SQLEXEC(Handle, "select * from authors")
=CURSORSETPROP("Tables", "authors")
** The next property must include every remote field matched with the
** view cursor field.
=CURSORSETPROP("UpdateNameList", "au_id authors.au_id, au_lname;
authors.au_lname, au_fname authors.au_fname, phone;
authors.phone, address authors.address,;
city authors.city, state authors.state,;
zip authors.zip, contract authors.contract")
=CURSORSETPROP("KeyFieldList", "au_id")
** The next property specifies which fields can be updated.
=CURSORSETPROP("UpdatableFieldList", "au_lname, au_fname, phone,;
address, city, state, zip, contract")
** The next property enables you to send updates.
=CURSORSETPROP("SendUpdates", .T.)
BROWSE
USE
=SQLDISCONNECT(handle)
ENDIF
************************* End of code ******************************
Any changes made to the data in the Browse window will update the table on
the remote server.
NOTE: If you are unsure of how to set the above properties you can create a
remote view. Please refer to the REFERENCES section for information on
creating a remote view.
130413 How to Create an Updatable Cursor (View) to Update Table
Additional query words: VFoxMac VFoxWin pass-through
Keywords: KB138094