General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Why update sql server table through remote view failed?
Hello every:
Why I update sql server table through romote view failed, my code like this:
CREATE CONNECTION mytest DATASOURCE "myodbc" USERID "myuser" password "ok" dabase "sys"
CREATE SQL VIEW t1090 remote conn mytest share AS SELECT * FROM codeupdate
use t1090
sele t1090
=cursorsetprop("buffering",3,"t1090")
=dbsetprop("t1090","view","updatetype",2)
=dbsetprop("t1090","view","shareconnection",.t.)
=DBSETPROP('t1090','View','Tables','codeupdate')
=DBSETPROP('t1090.codenumber','Field','KeyField',.T.)
=DBSETPROP('t1090.codeupdatekey','Field','UpdateName','codeupdate.codeupdatekey')
=DBSETPROP('t1090.codeupdatekey','Field','Updatable',.T.)
=DBSETPROP('t1090.codenumber','Field','Updatable',.T.)
=DBSETPROP('t1090.codeupdatekey','Field','Defaultvalue','1000')
=dbsetprop("t1090","view","sendupdate",.t.)
=DBSETPROP('t1090','View','WhereType',2)
=requery('t1090')
sele t1090
go top
replace t1090.codeupdatekey with 1589
local sss
sss=.f.
sss=tableupdate(.t.,.t.,'t1090')
? sss
if sss=.f.
=messagebox("failure")
endif
when I update the var 'sss' return .t., but the sql server table didn't update at all,why? Thank you.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only