Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing DBASE IV files
Message
From
31/03/2003 15:27:11
 
 
To
28/03/2003 16:34:46
Beth Wetherbee
Virginia Beach Public Schools
Virginia Beach, Virginia, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00733824
Message ID:
00772137
Views:
38
>>For anyone who can help ... here is my situation: I wish to create a VFP7 program which will access DBASEIV files which reside in various subdirectories on our network drive. All of those subdirectories are under a common ROOT subdirectory.
>>
>>So I guess the first step is to create some sort of ODBC connection to ....
>>and her comes the first problem ... to what ... the files or the ROOT subdirectory. And ... how to do that ...
>>
>
>I don't know if you still need this info, but we update dbaseIV files using a DSN-less connection like so:
>
>nSQLHandle=SQLSTRINGCONNECT("Driver={Microsoft dBase Driver *.dbf)};DBQ="+cSrc)
>
>where cSrc is the path to the directory with the db4 files.
>
>Then, you can issue SQLEXEC calls like:
>
>lnSuccess = SQLEXEC(nSQLHandle, "UPDATE contacts SET lastname to 'Smith'")
>
>or
>
>lnSuccess = SQLEXEC(nSQLHandle, "SELECT * FROM contacts WHERE lastname = 'Smith'", 'cMyCursor')
>
>Then you can browse cMyCursor, etc.
>
>Doing it this way means that you don't have to set up DSNs on the workstations - you just need the driver installed, which it probably is (I can't remember what ODBC drivers are installed when).
>
>The problem with converting DB4 files to VFP (only an issue if it has a dbt file), is that the dbt file converts fine TO VFP, but if you use COPY TO ... FOXPLUS to get it back to DB4 format (as advertised in VFP help), the contents of the memo file disappear. At least, that's the problem I'm currently having.
>
>HTH,

Thank you for the reply. I am not currently dealing with this but it may very well rear its ugly head again soon. I will print this out and keep it for later use. Thanks again.
Previous
Reply
Map
View

Click here to load this message in the networking platform