Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.


Linking Btrieve Files to MS Access???

Linking Btrieve Files to MS Access???

I need to update peachtree(2004)  data from ms access(2000).
I can link the tables in ms access but they are not updatable!

How can I make them updatable??

Also some of the tables can not be opened at all..

Help please..

RE: Linking Btrieve Files to MS Access???

Access requires a unique index in order to allow updates. If the table does not have a unique index, Access/Jet won't allow updates.   
What error do you get opening the tables that don't open?
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician

RE: Linking Btrieve Files to MS Access???

After Linking the "Customers" table I double click to open in access and I get:

ODBC- call failed.
[Pervasive][ODBC Client Interface][LNA][Pervasive][ODBC Engine Interface]Error in row. (#0)[Pervasive][ODBC Client Interface][LNA][Pervasive][ODBC Engine Interface]Numeric value out of range. (#0)

RE: Linking Btrieve Files to MS Access???

There is a new problem now. I can't link one of the tables named "JrnlHdr".

During linking I get  "Index already exists" error.

Any word about making the linked tables updatable???

RE: Linking Btrieve Files to MS Access???

Numeric value out of range could indicate corrupt data.  For example, if you have "Hello" in a price field or trying to put 40000 into a 2 byte signed integer (max is 32767).  
As far as the "index already exists", I've never seen that one. It could be a DDF issue. If you're DDFs and tables don't pass a database consistency test, that could cause problems.
For the linked table being updateable, if you don't have a unique index, Access/Jet won't let you update the record. THere's nothing from a Pervasive/ODBC perspective that can be done.  You'll either need to get Peachtree to add a unique index to that table or you'll need to add one your self.  I would strongly advise you not to add any indexes to these tables. Peachtree is very particular about it's data and may not funcntion properly if you add an index.
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician

RE: Linking Btrieve Files to MS Access???

Consistency test fails for all the tables in peach tree database. Pervasive Control Center can open the tables but I am not allowed to update or insert records.

Peachtree has no problem on the same database so I don't think it is a corrupt data files causing this..

RE: Linking Btrieve Files to MS Access???

I am guessing it may be due to ownership rights or permissions on data files but then again it is just a guess. I am kind of lost..

Is it  possible modifying peachtree data with pervasive active X Controls or better yet with direct Btrieve API calls. ( I am betting the answer is yes ). If so how should I form my DataBuf which will hold the data, in other words, should I include all the fields in Customer.dat file or can I just include the fields that I need for update and insert operations.

I have the ddfs but I don't know if they are complete or not because everybody is talking about peachtree not providing all the fields in ddfs. Do I need those fields for database operations through API calls.

Some of fields from Customer.dat file (there are about 300 of them total)

Field             POS        LEN         TYPE

CustomerID        0          21           11-Zstring
Customer_Type     21         9            11-Zstring
Contact           30         21           11-Zstring
Phone_Number      51         21           11-Zstring
FAX_Number        72         21           11-Zstring
and go on...

These are the fields that I need most

So if I define my structure as :

Type RecordBuffer
         CustomerID       As String * 21
         Customer_Type    As String * 9
         Contact          As String * 21
         Phone_Number     As String * 21
         FAX_Number       As String * 21
End Type

Type typ_PosBlk
    f1(1 To 128) As Byte
End Type

would that be enough for read and write operations.

RE: Linking Btrieve Files to MS Access???

It is not possible to update Peachtree files as they contain an owner name.  You can view them but if you try and update them outside the main program you will not be able to.


RE: Linking Btrieve Files to MS Access???

Is the owner peachtree itself or is it the company/person who installed the peachtree..

If the owner is the person or company who is installing and creating the company files then I am in good shape because I can obtain that info, But offcourse if the owner is peachtree then it is as you said not possible.

RE: Linking Btrieve Files to MS Access???

Peachtree is the one that assigns the owner names.  Unless you can get them to release that you won't be able to update their files.  Peachtree is now owned by Best Software and I doubt you will get the owner name from them.  This is at least from past experience.  I am not 100% sure their latest releases still have the owner name but I would guess it does.


RE: Linking Btrieve Files to MS Access???

I am sure you heard of PAWCOM active X component. How did they obtain the owner name as peachtree claims they have nothing to do with PAWCOM  and they do not support it either..

RE: Linking Btrieve Files to MS Access???

I have not heard of it.  But they must have gthe owner name in order to update the file.  You might contact the makers of the software for info.


RE: Linking Btrieve Files to MS Access???

I'm having a similiar problem. I want to change some values in the PhaseID field of the JrnlRow.dat file for a couple thousand records. I find that if I do a general update on from pervasive SQL data manager it works so I doubt the tables are read only. However if the Update stamement is conditional, I get an error 46(access denied). This might point to the whole "unique index" sittuation mentioned above, but if so, how come the conditional SELECT statement works fine. I'm desparate for a solution now. Anyone have any ideas?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close