delphi 6 and devart dbx driver

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for Oracle in Delphi and C++Builder
Post Reply
marcojk
Posts: 2
Joined: Fri 30 Mar 2012 08:08

delphi 6 and devart dbx driver

Post by marcojk » Fri 30 Mar 2012 08:20

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.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Fri 30 Mar 2012 11:11

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;

marcojk
Posts: 2
Joined: Fri 30 Mar 2012 08:08

Delphi 6 etc.

Post by marcojk » Mon 02 Apr 2012 09:53

:D Thanks a lot for Your help. It works now. I can afford the job.

regards

Marco.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Mon 02 Apr 2012 10:47

Hello,

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

Post Reply