PawCom Application Note 107: Using PawCom with Delphi ===================================================== Modified Aug 31, 2008 PawCom can be used with Delphi version d-6 and later. There are two approaches to interfacing Delphi to PawCom: o Use a tlb_pas wrapper around the PawCom library. o Use co-classes. If you elect to use a tlb_pas wrapper you should be aware that the wrapper that is generated by Delphi is incorrect. The unpatched d-6 has a problem that prevents it working properly with PawCom. This problem is resolved in V6 if you install all patches. PawCom uses the Btrieve (Pervasive) engine that is included with Peachtree's software. The Btrieve engine must be installed in order for PawCom to work. When you install PawCom it does not, by default, include the Delphi example. To include these do a custom install and be sure to select the Delphi components. After installing PawCom you should make sure it is functioning properly. If you have MS Access, run the Access front end to PawCom, refresh data from your company data files and see that the data is read without problems. Next try building the sample Delphi application - this is a simple application that displays a form for editing the company information and is similar to the Maintain Company Information form in Peachtree. Even though you will not be developing anything in MS Access, you will find the MS Access front end to PawCom to be a very useful diagnostic tool while you are developing your own application in Delphi. From Access you can click a button to read all the data out of your Peachtree data files into Access tables where you can examine exactly what the data records look like. This is particularly useful when you are writing records back to the Peachtree data files because you can compare the records you created with ones that Peachtree created to be sure you got everything right. The Access front end also contains a lot of code for working with the Peachtree data, so it is a good place to look to see how to do certain operations.