ghiehotamares
Programmer
Hi All,
Can you help me, when I run my program from visual foxpro and updating the data records from browse windows unable to send update to sql table(backend). my requirements should be automatic update the records to sql table/backend.
below is my program. can you assist me what I missed the commands/scripts.
hConn=("Driver=SQL Server;DSN=GHIESOURCE;Server=DESKTOP-KAH179Q;UID=;PWD=;DATABASE=MASTER")
nHandle=SQLSTRINGCONNECT(hConn)
?nHandle
SQLEXEC(nHandle,"SELECT * FROM DBO.MSreplication_options","tblMScursor")
set multilocks on
BROWSE && from this Im doing update/editing data records that should be sent to sql table backend.
=CURSORSETPROP("Buffering", 5, "tblMScursor")
=CURSORSETPROP("tables","dbo.MSreplication_options","tblMScursor")
=CURSORSETPROP("KeyFieldList","Id","tblMScursor") && Id is the name of the primary key
=CURSORSETPROP('UpdateFieldList', 'optname, major_version, minor_version, revision, install_failures, Id', 'tblMScursor')
=CURSORSETPROP("UpdateNameList", "optname optname","value value","major_version major_version","minor_version","revision revision","install_failures install_failures","Id Id", "tblMScursor")
=CURSORSETPROP("sendupdates",.t., "tblMScursor")
SELECT tblMScursor
TABLEUPDATE(2,.T.,"tblMScursor")
BROWSE
CLOSE ALL
Can you help me, when I run my program from visual foxpro and updating the data records from browse windows unable to send update to sql table(backend). my requirements should be automatic update the records to sql table/backend.
below is my program. can you assist me what I missed the commands/scripts.
hConn=("Driver=SQL Server;DSN=GHIESOURCE;Server=DESKTOP-KAH179Q;UID=;PWD=;DATABASE=MASTER")
nHandle=SQLSTRINGCONNECT(hConn)
?nHandle
SQLEXEC(nHandle,"SELECT * FROM DBO.MSreplication_options","tblMScursor")
set multilocks on
BROWSE && from this Im doing update/editing data records that should be sent to sql table backend.
=CURSORSETPROP("Buffering", 5, "tblMScursor")
=CURSORSETPROP("tables","dbo.MSreplication_options","tblMScursor")
=CURSORSETPROP("KeyFieldList","Id","tblMScursor") && Id is the name of the primary key
=CURSORSETPROP('UpdateFieldList', 'optname, major_version, minor_version, revision, install_failures, Id', 'tblMScursor')
=CURSORSETPROP("UpdateNameList", "optname optname","value value","major_version major_version","minor_version","revision revision","install_failures install_failures","Id Id", "tblMScursor")
=CURSORSETPROP("sendupdates",.t., "tblMScursor")
SELECT tblMScursor
TABLEUPDATE(2,.T.,"tblMScursor")
BROWSE
CLOSE ALL