Semicolon replaced with a blank space using the builtin driver version 6.7.10

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for Oracle in Delphi and C++Builder
Post Reply
luboice
Posts: 13
Joined: Thu 06 Dec 2007 12:55

Semicolon replaced with a blank space using the builtin driver version 6.7.10

Post by luboice » Mon 07 Dec 2015 09:48

Hello, DevArt!

After upgrading to version 6.7.10 and using the builtin driver we encountered an error when selecting a string value with a semicolon inside. The semicolon gets replaced with a blank space.

With driver from the external DLL the problem is not occurring.

See the code below for reproduction of the problem.

Regards

Code: Select all

program DevArtProblem1;

{$APPTYPE CONSOLE}

{$R *.res}

uses
  System.SysUtils, Data.SqlExpr, Data.DBXCommon, DbxOdaDriverLoader;

function GetTestString(const UseBuiltinDriver: Boolean): string;
const
  SDatabase = 'oracle_host:1521:service_name';
  SUserName = 'oracle_user';
  SPassword = 'oracle_pass';
var
  SQLConnection: TSQLConnection;
  SQLQuery: TSQLQuery;
begin
  SQLConnection:= TSQLConnection.Create(nil);
  try
    SQLConnection.LoginPrompt:= False;

    if UseBuiltinDriver then
      SQLConnection.DriverName:= 'DevartOracleDirectBuiltin'
    else
      SQLConnection.DriverName:= 'DevartOracleDirect';

    SQLConnection.VendorLib:= 'dbexpoda40.dll';
    SQLConnection.GetDriverFunc:= 'getSQLDriverORADirect';
    SQLConnection.LibraryName:= 'dbexpoda40.dll';

    SQLConnection.Params.Clear;

    SQLConnection.Params.Values[TDBXPropertyNames.Database]:= SDatabase;
    SQLConnection.Params.Values[TDBXPropertyNames.UserName]:= SUserName;
    SQLConnection.Params.Values[TDBXPropertyNames.Password]:= SPassword;

    SQLQuery:= TSQLQuery.Create(nil);
    try
      SQLQuery.SQLConnection:= SQLConnection;
      SQLQuery.SQL.Text:= 'select ''one;two'' as TEST_STRING from DUAL';

      SQLQuery.Open;
      try
        Result:= SQLQuery.Fields[0].AsString;
      finally
        SQLQuery.Close;
      end;
    finally
      SQLQuery.Free;
    end;

  finally
    SQLConnection.Free;
  end;
end;

begin
  try
    WriteLn('Test string with EXTERNAL driver : ', GetTestString(False));
    WriteLn('Test string with BUILTIN driver  : ', GetTestString(True));
  except
    on E: Exception do
      Writeln(E.ClassName, ': ', E.Message);
  end;

  WriteLn('Press any key to continue...');
  ReadLn;
end.

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

Re: Semicolon replaced with a blank space using the builtin driver version 6.7.10

Post by AlexP » Mon 07 Dec 2015 12:17

Hello,

We have already fixed the problem. The fix will be included in the next version.

luboice
Posts: 13
Joined: Thu 06 Dec 2007 12:55

Re: Semicolon replaced with a blank space using the builtin driver version 6.7.10

Post by luboice » Mon 07 Dec 2015 12:43

Is there any time frame for your next version release?
We need to know if we should wait or implement a workaround.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Semicolon replaced with a blank space using the builtin driver version 6.7.10

Post by MaximG » Mon 12 Sep 2016 14:37

Currently, dbExpress Driver for Oracle version 6.8.12 (28-Apr-2016) is available. Please download it and make sure that it includes the needed fixes.

luboice
Posts: 13
Joined: Thu 06 Dec 2007 12:55

Re: Semicolon replaced with a blank space using the builtin driver version 6.7.10

Post by luboice » Tue 13 Sep 2016 08:31

Thanks. We've already downloaded and use it as it resolves the problem.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Semicolon replaced with a blank space using the builtin driver version 6.7.10

Post by MaximG » Tue 13 Sep 2016 08:56

We are glad to see the problem resolved. Please don't hesitate to contact us with questions concerning dbExpress Driver for Oracle usage.

Post Reply