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

How do you create a Pervasive ODBC Client connection using Delphi?

Status
Not open for further replies.

pwesson

Programmer
Apr 10, 2000
95
0
0
CA
How to a create Pervasive ODBC Client connection via code? The following keeps returning an error... please help.
var
listParams: TStringList;
begin
listParams := TStringList.Create;
listParams.Add('IS_SYSTEM_DSN=True');
listParams.Add('IS_ENGINE_DSN=False');
listParams.Add('TCP_PORT=1583');
listParams.Add('SERVER_NAME=' + txtServer.Text);
listParams.Add('SERVER_DSN=' + txtDBName.Text);
listParams.Add('TRANSPORT_HINT=TCP:SPX');
listParams.Add('ARRAY_FETCH_ON=True');
listParams.Add('ARRAY_BUFFER_SIZE=8');
listParams.Add('UID=' + txtUserName.Text);
listParams.Add('PWD=' + txtPassword.Text);
PvSQLSession1.AddAlias(txtDBName.Text, listParams);
listParams.Free;
end;
ERROR = "Requested DTI call is not supported by P.SQL engine. Most probably you are using old or incompatible version. Alias name: XXXXX"
XXXX = txtDBName.Text entry
Delphi 5
Pervasive.SQL 2000 Service Patch 2A
Server is Windows 2000

Paul Wesson
paul@wessoft.com
 
I would highly recommend downloading the Pervasive Software Developers kit for code samples. - See ODBC Recipes for Delphi. This kit contains invaluable documentation concerning the Pervasive DBMS architecture and serves as a programmer's reference guide.

The query-based (ODBC) components (TtbQuery) requires the 7.5 and up Btrieve/Pervasive engine.

Keep in mind, you could also go through the native Btrieve API or the PDAC (Pervasive Direcortory Access Components) which serves as a Titan/BDE replacement component.

For the Pervasive SDK go to
 
Nothing wrong with your code. You just using old PDAC
version on newer engine. Download latest PDAC update
from Pervasive web site. It will solve the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top