Need Help with connecting to a database

Need Help with connecting to a database

Post by Ed » Wed, 17 Jan 2007 20:54:40


I've been trying now for a week to figure out how to connect to a Pervasive
Database and I've tried so many things that I'm completely lost.

What I need to do is access a set of btr files using SQL because there are
several files that need to be joined. But before I even get there I lost.
I've done several ado, MS SQL and DB AS400 projects, but I don't know where
to go from the start with this.

The remote PC has Pervasive ODBC Client Interface Driver loaded vs:
8.60.192.30, it has the necessary files: FILE,FIELD,INDEX,VIEW.DDF files
and the viewstbl.dsk file. I'm not on the server, but I have a mapped drive
(s:) to the directory where these files reside. I know that everything
works on the PC because the client is running their apps from here and I was
able to find a couple of delphi example programs that will also read the
files. The one that works is called: Btrieve Database Desktop (BDBD32.EXE)
from Polukot in Russa, but I can't get a hold of him and there is no source
code. This program doesn't even ask about the ODBC, you just pick the path
that the ddf files are in and it gives you a list of the dbs and then you
can double-click on the db and it opens it.

Need to figure out what component set I have to use to access the db in this
method. It tried to load OLE driver on the remote pc, but it gave me the
error: 'A Pervasive.SQL engine was not found on your system.' on
installation. I don't even think I need it because the bdbd32.exe program
example above ran without it.

This is what I'll will be doing with the program and what I do now:
I have a service app that starts a second app once a day.
The second app connects to a db, extract the data based on a date range
to a tabbed delimited file.

So I guess this is what I need to do:

1. Figure out how to access the databases via SQL.
2. Need to do it very cheaply. This is a test that I'm doing for another
company and I'm not even getting paid for it.
3. A couple sample btrieve sql statements doing outside joins.

Please help, I'm passing the point of not saving face.

Thanks,

Ed
 
 
 

Need Help with connecting to a database

Post by Bill Tod » Thu, 18 Jan 2007 00:58:12

If I understand correctly you are trying to connect to a Pervasive SQL
database using ADO and the Pervasive ODBC driver. All you have to do is
drop a TADOConnection component on your form or data module then open
the ConnectionString property editor by clicking the ellipsis button.
Choose the DSN you want to connect to from the drop-down list then
click the Test button to confirm that you can connect.

--
Bill Todd (TeamB)

 
 
 

Need Help with connecting to a database

Post by Phil Barbe » Wed, 24 Jan 2007 01:24:00

I don't remember exacly where but on the Pervasive web site they have some
native VCL delphi components and a SDK that can be downloaded.
Phil



doing for another
 
 
 

Need Help with connecting to a database

Post by Bill Tod » Wed, 24 Jan 2007 06:03:53


FYI, The components are the PDAC components and they are not well
supported. It was almost seven months after BDS2006 was released before
Pervasive updated the PDAC components. The performance of the TpvTable
component is good, however, the performance of the TpvQuery component
is consistently slower than using the ADO components with the Pervasive
ODBC driver. This has been confirmed by Pervasive support. My client
and I have also tested the Pervasive OLE DB provider and found it
slower than the ODBC driver for executing SQL.

--
Bill Todd (TeamB)