Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying a row from Pervasive to MsAccess

Status
Not open for further replies.

Pietjeparasietje

Programmer
Jun 13, 2005
55
NL
Hi,

I want to copy or insert a row into a MsAccess table from a Pervasive dataFile.
Any ideas on how to do this, is there a component that can handle this, or am I just not doing something simple?

Thnx,

Peter
 
The short answer is that you'll need to read the row from Pervasive then insert it to Access.
The longer answer depends on a number of factors including what version of Pervasive (Btrieve) and the interface you want to use (Btrieve, ODBC, PDAC, etc).
What is your end result? Are you really trying to copy one record to Access from Pervasive?


Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
Custom VB and Btrieve development.
 
I want to copy just one record from the Pervasive DataFile to MSAccess. Using ODBC or PDAC whatever works best.
And I don't want to have the save the in a variable first.

Peter
 
What have you written so far? Are you getting errors or are you just starting?


Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
Custom VB and Btrieve development.
 
No, I was just wondering whether there was a component that could handle this. The problem is that it are 2 different dataSources. So I thought maybe there is a way to connect to those 2 at the same time and simply execute a sql "insert into " statement?

Peter
 
I doubt there is a specific component that will copy on row from a Pervasive database to an Access database.
Code to do it could probably be written fairly easily (my Delphi is giving me trouble but it should be too hard).
You'd need to do something like:
TQuery/PvQuery to Pervasive with SQL to read the record.
TQuery to Access and add a new record using the values from the Pervasive TQUery (or PvQuery) and post the record.


Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
Custom VB and Btrieve development.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top