Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursoradapter, Sql and Tableupdate()
Message
De
29/09/2004 09:38:38
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Cursoradapter, Sql and Tableupdate()
Divers
Thread ID:
00947144
Message ID:
00947144
Vues:
59
Ok this is what I have so far.
But it does not use the tableupdate(), what do i need to change to add that?
CLOSE DATABASES ALL 
CLEAR

customerid='ALFKI'

LOCAL oCA as CursorAdapter

oCA=CREATEOBJECT("CursorAdapter")
oCA.AddProperty("customerid",'ALFKI')
oCA.SelectCmd="select * from Northwind..Orders where customerID = ?this.customerid"
oCA.KeyFieldList = "OrderID"
oCA.UpdatableFieldList = "Customerid, employeeid, freight, orderdate, orderid"
oCA.UpdateNameList = "Customerid orders.customerid, employeeid orders.employeeid, "+ ;
   "freight orders.freight, orderdate orders.orderdate, orderid orders.orderid"
oCA.CursorSchema = "customerid c(5), employeeid i, freight y, orderdate d, orderid i"

LOCAL oConn as ADODB.Connection, oRS as ADODB.Recordset, oCom as ADODB.Command

oConn=CREATEOBJECT("ADODB.Connection")
oConn.Open("Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Data Source=(local)")

oRS = CREATEOBJECT("Adodb.RecordSet")
oRS.ActiveConnection = oConn
ors.CursorType = 3
ors.CursorLocation = 3
ors.LockType = 3


oCom = CREATEOBJECT("Adodb.Command")
oCom.ActiveConnection = oConn

oCA.DataSourceType="ADO"
oCA.DataSource=oRS

?oCA.CursorFill(,,,oCom)
BROWSE

oCA.customerid='HILAA'

oCA.CursorRefresh()
BROWSE


USE
If I change data in cursor one then rerun the changes are there. But really want to use tableupdate to validate noone else has changed the data.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform