Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Passthrough Command
Message
De
17/04/2002 22:54:51
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
SQL Passthrough Command
Divers
Thread ID:
00646153
Message ID:
00646153
Vues:
34
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform