Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADO with VFP tables
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00720855
Message ID:
00720915
Views:
11
>I am using ADO 2.6 connection and recordset objects to access VFP tables.
>
>My project forms are using the standard VCR-type record navigation buttons (First, Previous, Next, Last) but because the ADO recordset BOF and EOF properties don't return true until I try to position before the first record or after the last record (due to the way .DBF tables are structured), I'm getting that annoying repeating first and last record.
>
>Does anyone know an efficient way to handle the phantom record when BOF and EOF is encountered?
>
>Thanks.

Wow, Another VFP developer in Thomasville! That makes four that I know of now. A few more and we might have enough for a users group <g>.

To make this work you will probably have to change the code to check for the first or last record after each row change. You could use the recordset's AbsolutePosition property for that. If value is one then at BOF. For EOF you can store the recordset's recordcount value to check against. Remember to set the connection object's cursor location to client side cursor (3) or the AbsolutePosition property will return -1 instead of the current row position.

My first question would be why are you using ADO from VFP to access a native VFP table?
Michael McLain
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform