Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cursoradapter, Sql and Tableupdate()
Message
From
29/09/2004 09:38:38
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Cursoradapter, Sql and Tableupdate()
Miscellaneous
Thread ID:
00947144
Message ID:
00947144
Views:
57
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.
Next
Reply
Map
View

Click here to load this message in the networking platform