Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dates and cursor Adapter
Message
De
13/05/2003 17:05:49
 
 
À
12/05/2003 14:07:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00787394
Message ID:
00787934
Vues:
19
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform