chpicker
Programmer
- Apr 10, 2001
- 1,316
Has anyone ever tried to use the VFP ODBC driver in Visual C++? I tried making a quick app using the MFC wizard, and it worked...mostly.
I created an ODBC object for my database in the control panel, chose one of the tables in the database to link the app to, and threw a few fields on a dialog for browsing through. This particular table has over 160,000 records of 1k each. When I launch the app that was made, it loads the WHOLE TABLE into memory before displaying the app! This takes awhile for a 160 meg table! After loading, everything worked as expected, but it's that load time that bugs me. Is there something I'm missing here? Is it an ODBC issue? Is there something I need to put in the code to make it only load the record(s) it's using into memory?
Also, when I have the table set to load as a DYNASET, I get the error "ODBC driver does not support dynasets". I assume this means you CANNOT use a Dynaset with the VFP ODBC driver. This is rather annoying, but is there any way around that? Snapshots don't seem to be the right solution for me since the app I'm trying to develop needs to update various displays in real time. Requerying every time the record pointer moves seems like an awful waste, and sometimes the data changes need to be displayed even if the record pointer DOESN'T move. Any suggestions?
I saw an MSDN article that said the preferred method of accessing VFP tables was through VFP DB OLE (or something like that). How do you set that up?
I created an ODBC object for my database in the control panel, chose one of the tables in the database to link the app to, and threw a few fields on a dialog for browsing through. This particular table has over 160,000 records of 1k each. When I launch the app that was made, it loads the WHOLE TABLE into memory before displaying the app! This takes awhile for a 160 meg table! After loading, everything worked as expected, but it's that load time that bugs me. Is there something I'm missing here? Is it an ODBC issue? Is there something I need to put in the code to make it only load the record(s) it's using into memory?
Also, when I have the table set to load as a DYNASET, I get the error "ODBC driver does not support dynasets". I assume this means you CANNOT use a Dynaset with the VFP ODBC driver. This is rather annoying, but is there any way around that? Snapshots don't seem to be the right solution for me since the app I'm trying to develop needs to update various displays in real time. Requerying every time the record pointer moves seems like an awful waste, and sometimes the data changes need to be displayed even if the record pointer DOESN'T move. Any suggestions?
I saw an MSDN article that said the preferred method of accessing VFP tables was through VFP DB OLE (or something like that). How do you set that up?