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

Migrating ODBC connection to PSQL 2000 from Btrieve

Status
Not open for further replies.

yakhunter

Programmer
Nov 15, 2001
1
US
One of my clients uses Platinum for their accounting system. They were running Platinum for DOS, which used Btrieve for the database engine. I built a website that provides reports of their accounting data.

Recently, they decided to upgrade to Platinum 5 for Windows, which uses Pervasive SQL 2000i. The Platinum consultant came in and installed the engine, not realizing what other things it could be affecting. Needless to say, I soon got calls reporting that the web site was not working. I loaded the new ODBC / OLE-DB drivers, but I am still stuck as to where to go next.

The client I work for accounts for hundreds of companies. So, my website uses 'dynamic' ODBC connection strings to connect to the data without having to create ODBC DSNs for every single company.

An example of the ADO connection string that I was using previously goes like this:

ConnStr = "Driver={Pervasive Software ODBC-32};DSN=;
   DATAPATH=" & DBPATH & ";UID=;PWD=;
   DDFPATH=" & DBPATH & ";BOB=;NullEnabled=no;FeaturesUsed=no;
   LoginScript=;AccessFriendly=yes;DateFormat=mdy;
   TranslateDLL=;TranslateOption=;"

So, when the site user clicked on a company name, I had in a database the corresponding directory where that company's Platinum data is contained. In the place of the 'DBPATH' variables, would be a path like '\\server\directory\000101'. The only thing that would change in the path would be the final directory name ('000202', '010543', etc.).

So, the final ADO connection string looked like this:

Driver={Pervasive Software ODBC-32};
   DSN=;DATAPATH=\\server\directory\000101;UID=;PWD=;
   DDFPATH=\\server\directory\000101;BOB=;NullEnabled=no;
   FeaturesUsed=no;LoginScript=;AccessFriendly=yes;
   DateFormat=mdy;TranslateDLL=;TranslateOption=;

This worked like a charm and has worked as such for over two years now. (Each directory has DDFs in it)

Now, since the engine has been upgraded, I am unable to connect from my website. I have installed the new ODBC / OLE-DB drivers, but cannot figure out where to go from there.

I have researched as much as I could on Pervasive's site and the web looking for help. What I am understanding from Pervasive documentation is that for each database, you have to create a DSN on the server and then create a DSN on the workstation, in order to be able to connect via ODBC.

Now, while the consultant has upgraded the engine, she has not yet touched the client machines. So, their configurations have not changed... They do not have PCC loaded on their machines. No DSNs have been set up on their machines. They do not have new client software. And they are quietly accounting away (in Platinum for DOS).

I need to try to find a way to be able to use dynamic DSNs to connect to the data from my website. I am confident that there is still a way to do it. I just can't find it anywhere. It's probably pretty simple, and I am just overlooking the obvious.

Can anyone out there please point me in the right direction? Any pointers on connecting without creating all these DSNs? Thanks.
 
I figured out that I can use the following string to connect to the database:

Driver={Pervasive ODBC Client Interface};DSN=;DBQ=\\Server\directory\009999;UID=;PWD=;ServerName=Server

Works well... Now I'm discovering all the SQL language changes between versions. Arrggghhhh! :(
 
All the info you should need is probably in the What's New documentation or in the SDK which is downloadable from the Web. There has been an evolution in the Relational engine since it was really just a driver in the Btreive days, but the good news is that it is now a full ODBC native relational engine.

Once you have dealt with the connection strings and the syntax, you will need to check the DDFs. Old DDFs can exhibit very funny symptoms if they are not fixed and up to date. Contact Platinum for those, but also download the CNVDDF tool and doc from the Pervasive Website to check the DDFs, and run them through the Database Consistency Check wizard in the PCC to make sure.

Lastly, you can also call and work with Pervasive Developer Support to help get these issues resolved. Dev Support are real programmers who do nothing but work with programmers on code issues.

Pervasivite
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top