Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select * using SPT returning duplicate records
Message
 
 
To
26/06/2003 13:56:01
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00804056
Message ID:
00804377
Views:
32
The VFP ODBC driver has not changed in VFP8 and I seem to remember we have been told there are no changes planned for this driver. Sooo, I see the same duplication problem in VFP8 as well which is what I expected.

>There are no deleted records in the tables and set deleted is ON.
>
>It appears that "fetch in background" being ON is causing the duplicate records in SPT queries. I reset fetch in background in the DSN and it ran a lot slower but without dups. I checked the RV's and they are set up to "fetch all records" and "fetch as needed" is off which I guess overrides the fetch in background setting of the connection. That may explain why using the same DSN, RV's worked and SPT did not.
>
>To me this looks like a BUG in the ODBC driver for VFP. When fetch in background is on, it seems to be losing its place when fetching records and in this case it is returning duplicate rows. It appears that I can't programatically turn off the fetch in background setting using SQLSETPROP(), so I guess it will always use the setting in the ODBC DSN.
>
>If I hadn't been appending records to a copy of the table with the same primary key, I would have never found this. I wonder what effect this is having on the SPT queries that I use for reports. I now suspect that it may not be getting all records that it should or may possibly be getting some dups. I did not see this behavior with SQL server ODBC driver, but there is no fetch in background option in that one.
>
>Thanks to Joel for pointing me in the right direction. I wonder if this has been corrected in VFP 8?
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform