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

Peachtree - pawcom, odbc, how to get data from PT

Status
Not open for further replies.

crudmop

Programmer
Aug 20, 2004
1
US
Hi all -

I've read thru most of the threads here on PT - here's my situation...

I have a ticketing system I am finishing up for a client in .asp/sql2000. The client is now asking that I pull all customer and inventory data from their PT system when creating service requests, and later entering general ledger records when requests are closed.

I have set up a nightly batch process to pull exports of the customer list from pt, as well as their inventory master, importing into sql to deal with the routine searches on equipment availability and customer accounts.

My next step is to (1)perhaps pull the customer/inventory data right from PT, and (2)write the data back to PT directly, versus a DTS process to export out ledger records for importing back into PT. It'd be much easier to just dump in at the transaction level into the PT file, as well as give realtime access to inventory and customer control.

Most of the documentation for pawcom revolves around using MSaccess as a front-end - I am more interested in utilizing the com object to access the data directly.

Enough of my blabbing - to access the data, am i able to directly access the customer/inventory/ledger info, and if so, which files represent that data (I am a total newb to PT, and documentation really leaves a lot to be desired)

If possible, could someone post up a sample chunk of code that might get me started?
Thanks in advance for any help!!

 
Hello,
As you are probably aware, the PT database is a descendant of Btrieve and currently lives in Pervasive.SQL (latest version right now is 8.6).

You can access the db files directly if you download the workgroup engine (free) here:

Once you have this engine installed, you can use VB (or other languages you may have) in the same manner you would for an access db etc. You can even use the adodc and datagrids; just specify the Pervasive ODBC engine interface installed with the engine.

They even have sample code and excellent documentation. I have implemented the samples in Visual Studio and found no bugs. If you have a bad taste in your mouth over Btrieve from past experiences (i did) you can rest easy. The bugs are gone.

The code is clean and will get you started.

As to the names of the files, I have no clue.

Hope this helps, James May
 
I know you can access customer and I am pretty sure you can get inventory and ledger data.

The real answer to your question is, if you look in the P-Tree documentation either with the system (if the help was installed) or on their web site, there is reasonable documentation about table and field names.

It is not perfect and there are sometine holes in it but I have found it gets you pretty close.
 
Have any of you ever had problems with not being able to link to a specific table. I am using MS Access as a front end, trying to draw data from PT. I can see the data on the Pervasive Control Console; tables etc, but when I try to link to the tables via Access ODBC, I get an error message - Invalid field definition 'JournalGUID' in deinition of index or relationship.

I get this for the JRNLHDR and JRNLROW tables, which keeps me from progressing any further.

I have Pervasive SQL engine V8 set up.

Thanks for your help.

Karl

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top