Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Passthrough Command
Message
From
17/04/2002 22:54:51
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SQL Passthrough Command
Miscellaneous
Thread ID:
00646153
Message ID:
00646153
Views:
33
Hi,

I use sqlpassthrough to update the remote tables. Here is the code

in the load event of my form, I place the following code

nHandle = Sqlconnect("bbfsdsn")
csql = [Select callrefno, calldate, calltime from Accounting!callinv]
nResult = Sqlexec(nHandle, csql, "Cur_callinv")

Cursorsetprop("Tables","callinv","cur_callinv")
Cursorsetprop("KeyFieldList","callrefno","cur_callinv")
Cursorsetprop("UpdatableFieldList","calldate,calltime","cur_callinv")
Cursorsetprop("SendUpdates",.T.,"cur_callinv")
Cursorsetprop("Buffering",5,"Cur_callinv")

I also placed the following code in the init event

thisform.grid1.RecordSource = "cur_callinv"
thisform.grid1.column1.ControlSource = "cur_callinv.callrefno"
thisform.grid1.column2.ControlSource = "cur_callinv.calldate"
thisform.grid1.column3.ControlSource = "cur_callinv.calltime"

I placed the following code in the click event of mybutton

Tableupdate(.T.,.T.,"cur_callinv")
thisform.Release()

The problem is everytime I change a field value in the grid and hit the updated button, it does not update the remote data. What seems to be wrong?
Music Rocks www.musicreserve.blogspot.com
Success is 1% Inspiration & 99% Perspiration
God Sometimes Delays His Help to Test Our Faith and Energize Our Prayers
Our Boat May Be Tossed While He Sleeps, But He Wakes Up Before it Sinks.
Next
Reply
Map
View

Click here to load this message in the networking platform