Page 1 of 1

delphi 6 and devart dbx driver

Posted: Fri 30 Mar 2012 08:20
by marcojk
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!! :shock:

Marco.

Posted: Fri 30 Mar 2012 11:11
by AlexP
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.

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.

Posted: Mon 02 Apr 2012 09:53
by marcojk
:D Thanks a lot for Your help. It works now. I can afford the job.

regards

Marco.

Posted: Mon 02 Apr 2012 10:47
by AlexP
Hello,

Glad to see that the problem was solved. If you have any other questions, feel free to contact us.