Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dates and cursor Adapter
Message
From
13/05/2003 17:05:49
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00787394
Message ID:
00787934
Views:
17
Hi Roy.

>lo = NEWOBJECT("testcursoradapter")
>
>lo.DataSource = "Driver=SQL Server;Server=DEVTEST;DATABASE=TESTDB"
>
>lnConnect = SQLSTRINGCONNECT(lo.DataSource)
>
>lo.SelectCmd = "SELECT nPA_id,tFollowup_Dt FROM PA_TEST"
>
>lo.CursorSchema = "col1 n, col2 D"
>
>lo.CursorFill()

DataSource should be set to an open connection handle *and* DataSourceType should be set to "ODBC". So, change your code to:
lo = NEWOBJECT("testcursoradapter")
lo.DataSourceType = "ODBC"
lo.DataSource = SQLSTRINGCONNECT("Driver=SQL Server;Server=DEVTEST;DATABASE=TESTDB")
lo.SelectCmd = "SELECT nPA_id,tFollowup_Dt FROM PA_TEST"
lo.CursorSchema = "col1 n, col2 D"
lo.CursorFill()
Also, this won't be updatable unless you fill in the KeyFieldList, UpdateNameList, UpdatableFields, and Tables properties.

Doug
Previous
Reply
Map
View

Click here to load this message in the networking platform