Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Send updates using SPT to SQL Server
Message
From
07/12/1998 09:34:32
Marco Beuk
Innovero Software Solutions
The Hague, Netherlands
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Send updates using SPT to SQL Server
Miscellaneous
Thread ID:
00164714
Message ID:
00164714
Views:
69
TableUpdate() returns .T. but my remote table isn't updated, somethimes the error 'No update tables are specified' is in the AERROR().
I am new in this stuff so could please someone tell me why this code doesn't update my remote table? (VFP 5.0 & SQL Server 7.0)


SET MULTILOCKS ON
n=SQLCONNECT('Crime')

sqlsetprop(n,'DispWarnings',.T.) &&I don't get errormessages
SQLSETPROP(n,'Transactions',1)
SQLSETPROP(n,'BatchMode',.F.)
SQLSETPROP(n,'Asynchronous',.F.)

var=sqlexec(n,"select * from titles where titDescr like '%PIRATE%'","test")
var=sqlmoreresults(n)
replace titDescr with 'testestestest'
brow &&Replacement in cursor succeeded
var=cursorsetprop('Buffering',5,'test')
var=cursorsetprop('sendupdates',.t.,'test')
var=cursorsetprop('tables','titles','test')
var=cursorsetprop('keyfieldlist','titId','test')
var=cursorsetprop('updatenamelist','titDescr titDescr','test')
var=cursorsetprop('updatablefieldlist','titId, titDescr','test')
if tableupdate()
messagebox('update succeeded!!!') &&update always succeeds
endif
sqlcommit(n)
var=sqlexec(n,"select * from titles where titDescr like '%PIRATE%'","test2")
sqlmoreresults(n)
if grpnaam = 'testestestest'
messagebox('updated in remote table')&&Never seen this messagebox working
endif
brow
use in test
use in test2
sqldisconnect(n)
Reply
Map
View

Click here to load this message in the networking platform