vb_xml
asked on
FoxPro for DOS 2.6 SHARED access to DBF and CDX files opened in VB at the same time FoxProDOS is accessing the files.
I am rewriting a database project in VB6 that is currently running in FoxPro for DOS 2.6. I want to create a data-object handler that I can later change to a different database format. But during the transition, I want to continue to use the old FoxPro program while also allowing users to use the new VB6 modules as they are created. I need to be able to access the data in the .DBF, .FPT, and .CDX files in SHARED mode on a LAN without fear of corrupting the FoxPro data and properly maintaining the .CDX indexes (plural). Is this possible? Can both VB6 and FoxProDos2.6 be accessing the data at the same time? If so, can anyone point me to example code for opening these FoxPro database tables? The only method I have found so far locks the files and does not allow SHARED access. Thanks.
You can use ADO commands to do what you would expect to the Fox data via ODBC from VB6.
ASKER
"Make sure you have the latest ODBC Driver for Visual FoxPro on hand that is fully backward compatible"
In talking with Microsoft, they don't guaranty that Visual Fox Pro will maintain FoxPro for DOS DBFs correctly and recommend converting the old files to VFP which the old DOS program will then not be able to use at all. I need to read and update DBF FPT and CDX files that will never be opened in VISUALForxPro and continue to be used in an old DOSFoxPro2.6 program. If I can find an old driver somewhere, the only way I would know if it were "fully backward compatible" is to try and get it to work and then write a test program that updates a lot of records and see if it corrupts the files or indexes and hope my test program covered all the bases. Which I guess I will have to take the time to do. I guess I was hoping that some else has had the need to open these database tables without preventing normal access by their old FoxProDos app - and can say that it is running ok without corruption. Then at lease I would know I was testing the most probable solution. But if there is no definitive answer, I guess it is good to know that I should get on with looking for driver and writing test routines if only to find they don't work.
In talking with Microsoft, they don't guaranty that Visual Fox Pro will maintain FoxPro for DOS DBFs correctly and recommend converting the old files to VFP which the old DOS program will then not be able to use at all. I need to read and update DBF FPT and CDX files that will never be opened in VISUALForxPro and continue to be used in an old DOSFoxPro2.6 program. If I can find an old driver somewhere, the only way I would know if it were "fully backward compatible" is to try and get it to work and then write a test program that updates a lot of records and see if it corrupts the files or indexes and hope my test program covered all the bases. Which I guess I will have to take the time to do. I guess I was hoping that some else has had the need to open these database tables without preventing normal access by their old FoxProDos app - and can say that it is running ok without corruption. Then at lease I would know I was testing the most probable solution. But if there is no definitive answer, I guess it is good to know that I should get on with looking for driver and writing test routines if only to find they don't work.
He has his answer. <s> MS certainly gave none.
But he got it from M$ and we know what that is worth ;)
They don't support old products and old technology and wouldn't say that the new technology works because they either don't know OR they can't say they support something that has passed out of the normal lifecycle. FoxPro 2.6 was released in 1993. It was the last FoxPro release before Visual FoxPro 3 got released in 1995, the first MS product to be released for Windows 95 and even released before Windows 95.
I get good support from MS. But, I don't go through normal channels. One of the perks of being an MVP, I guess.
I get good support from MS. But, I don't go through normal channels. One of the perks of being an MVP, I guess.
Must be nice, but you earned it.
I have tried. But, there are plenty of them sharper than I am.
There is always someone smarter, but it does not lessen your abilities.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ODBC Driver for Visual FoxPro
Without a database container (Free Table Directory)
oConn.Open "Driver={Microsoft Visual FoxPro Driver};" & _
"SourceType=DBF;" & _
"SourceDB=c:\somepath\mySo
"Exclusive=No"
http://www.able-consulting.com/MDAC/ADO/Connection/ODBC_DSNLess.htm#ODBCDriverForVisualFoxPro
Make sure you have the latest ODBC Driver for Visual FoxPro on hand that is fully backward compatible with what you have:
Visual FoxPro ODBC Driver
http://msdn.microsoft.com/vfoxpro/downloads/updates/odbc/default.aspx