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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking Btrieve Files to MS Access???

Status
Not open for further replies.

amigo02

Programmer
Feb 19, 2003
109
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..
 
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?


info@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
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)
 
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???
 
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.


info@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
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..
 
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.
 
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.



Gil
 
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.
 
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.


Gil
 
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..
 
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.

Gil
 
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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top