Link to home
Start Free TrialLog in
Avatar of cebu1014
cebu1014

asked on

Update btrieve tables

Is there a possibility to find a program that will write/update records in a btrieve table. There is an cobol application we run that is ran with a   pervasive database engine  but how to update these btrieve records from a flat file such as txt  or csv  or anyother is all new to me. Sure need some help on this.
Avatar of Mirtheil
Mirtheil
Flag of United States of America image

There is not a generic program that will do what you want.  
Depending on several factors including version of Btrieve/Pervasive and  whether you've got DDFs or not, it may be easier to build a program.  
If you have DDFs and have a recent Pervasive engine (PSQL 2000 or later) with an ODBC driver, you might be able to create a program that reads the CSV/TXT file and writes or updates the records.  You might even be able to use the Pervasive Data Integration tools.  
If you don't have DDFs and can't build them, you would be limited to the Btrieve API and would need to read the records from the TXT/CSV file and insert/update the records using the Btrieve API calls.  You'd still need to know the exact record structure so the Btrieve API calls don't corrupt the data.
Avatar of cebu1014
cebu1014

ASKER

I have the ddf files there is a english and complete(programmer) set. I have Pervasive 8 which I belive is later than 2000. I am not sure since I dont have access to server now.  Would there be tools in this version or later version of Pervasive that allow for me to accomplish this? I have only thus far used ODBC drivers for pervasive to query into another program such as crystal

Thanks.
PSQL v8 is a later version than PSQL 2000.  It should have an ODBC driver.  You'd want an engine DSN on the server pointing to the data and DDFs.  On the client, you'd want a Client DSN pointing to the Engine DSN.  

As far as tools, I think PSQL v8 had an Import Wizard.  It might do what you need.  
Again, you might look at the Pervasive Data Integration tools.  It'll help, especially if this is an ongoing project.  If it's a one time thing, the import wizard might work best.
I have imported a table from a file generated from the export wizard. It exports as a sdf file are there any other file formats you can use to import into btrieve besides the sdf extension? Can you do updates  to existing records as well as import new ones? I have tried but I get errors. I have been sucessful only importing new records into a empty table.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Bill Bach
Bill Bach
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial