Hi I have the same request.
I am using Delphi 2007 and PDAC v9. I can create a working DSN that is visible in the Pervasive Control Centre. I would like however to create it as a System DSN - as a server and client DSN.
The pervasive guide( http://www.pervasive.com/support/technical/psqlv9/PSQL_PDAC_Guide.pdf) gives some direction but it does not seem to work.
Here is the code I am using:
procedure TfrmCreateNewDSN.Button1Click(Sender: TObject);
var MyList,SystemDSNList: TStringList;
begin
MyList := TStringList.Create;
try
with MyList do
begin
Clear;
Add('DDF_PATH= C:\pastel07\');
Add('PATH=C:\pastel07\testcompany\');
Add('BOUND=False');
Add('INTEGRITY=False');
Add('Create_DDF=False');
end;
dm.PvSession1.AddAlias('testcompany', MyList);
finally
MyList.Free;
SystemDSNList := TStringList.Create;
try
with SystemDSNList Do
begin
clear;
Add('DB_NAME=test');
Add('IS_ENGINE_DSN=False');
Add('IS_SYSTEM_DSN=True');
Add('SERVER_NAME=renier-pc');
Add('SERVER_DSN=testcompany');// *** this dsn does not exist and is the SYSTEM DSN to be created ***
dm.PvSqlSession1.AddAlias('testclient', SystemDSNList);
end;
finally
SystemDsnList.Free;
end;
I get the following error:
Project Project1.exe raised exception class EPvSqlInstallerEngineError with message 'Driver's ConfigDSN, ConfigDriver, or ConfigTranslator failed. Session name is PvSqlSession1_1. Component is PvSqlSession1, owned by DM'.
Can someone please point me in the right direction?
Thanks
Renier Nell