I've to modify an old application written with delphi 6.0. The application originally worked with an interbase rdbms but now i've to use the Oracle 10g xe rdbms. I've tried a lot with the trial version of Your driver but still i'm not able to have a connection. Can you help me? I've to use a normal TSqlConnection or i've to use the TCRSqlConnection? How i've to set the params?
Thanks in advance for Your help. I'm getting really crazy!!
Marco.
delphi 6 and devart dbx driver
Hello,
Below is the code demonstrating the Oracle connection in two modes: 1 - using the Oracle client, 2 - using the direct mode. In the specified code, set your data (Login, password, HOST, PORT, SID) and try to connect to Oracle. If any problems occur, please contact us once again.
Below is the code demonstrating the Oracle connection in two modes: 1 - using the Oracle client, 2 - using the direct mode. In the specified code, set your data (Login, password, HOST, PORT, SID) and try to connect to Oracle. If any problems occur, please contact us once again.
Code: Select all
var
SQLConnection: TSQLConnection;
begin
SQLConnection := TSQLConnection.Create(nil);
try
SQLConnection.ConnectionName := 'Devart Oracle';
SQLConnection.DriverName := 'DevartOracle';
SQLConnection.GetDriverFunc := 'getSQLDriverORA';
SQLConnection.LibraryName := 'dbexpoda.dll';
SQLConnection.VendorLib := 'OCI.DLL';
SQLConnection.Params.Values['DataBase'] := 'SID';
SQLConnection.Params.Values['User_Name'] := 'login';
SQLConnection.Params.Values['Password'] := 'password';
SQLConnection.LoginPrompt := false;
try
SQLConnection.Connected;
except
on e: Exception do
ShowMessage(e.message);
end;
finally
SQLConnection.Free;
end;
SQLConnection := TSQLConnection.Create(nil);
try
SQLConnection.ConnectionName := 'Devart Oracle Direct';
SQLConnection.DriverName := 'DevartOracleDirect';
SQLConnection.GetDriverFunc := 'getSQLDriverORADirect';
SQLConnection.LibraryName := 'dbexpoda.dll';
SQLConnection.VendorLib := 'dbexpoda.dll';
SQLConnection.Params.Values['DataBase'] := 'host:port:sid';
SQLConnection.Params.Values['User_Name'] := 'login';
SQLConnection.Params.Values['Password'] := 'password';
SQLConnection.LoginPrompt := false;
try
SQLConnection.Connected;
except
on e: Exception do
ShowMessage(e.message);
end;
finally
SQLConnection.Free;
end;
Delphi 6 etc.
Thanks a lot for Your help. It works now. I can afford the job.
regards
Marco.
regards
Marco.