Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CursorAdater and Access Tables.
Message
From
09/11/2002 14:51:40
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00720660
Message ID:
00720667
Views:
10
Simon,

This is a genuine stab in the dark...

long ago, when I worked with ACCESS a bit, I had to code a semi-colon at the end of a select statement.
Don't know if that's needed here, but might be worth a shot.



>I have been trying to use the CursorAdapter to read the info from an Access table, but I am having no luck, I have attached the code, if somebody can tell me whats wrong with the code ?
>
>DEFINE CLASS clsADOData AS CursorAdapter
> PROCEDURE Init
> This.DataSourceType = "ADO"
>
> This.AddProperty("oConn",NEWOBJECT("ADODB.Connection"))
> This.AddProperty("oRS" ,NEWOBJECT("ADODB.RecordSet"))
>
> This.oConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\Dev\vfp8\NWind.mdb"
> This.oConn.Open()
>
> *-- Attach to The RecordSet
> This.oRS.ActiveConnection = This.oConn
>
> This.SelectCmd = "Select * From Customers"
>
> This.CursorFill()
> ENDPROC
>ENDDEFINE
>
>oAccess = CreateObject('clsADOData')
>*-- Should have a cursor with the customers, but nothing ?
>
>
>This code was modified from one that talks to SQL Server and that worked.
>
>Thanks,
>Simon.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform