Page 1 of 1

IBCConnection.ExecSQL with stringparam - string right truncation

Posted: Thu 08 Oct 2015 08:10
by Jank
Hello,

I am playing with IBDAC 5.6.19 for RAD Studio 10.
If I do IBCConnection1.ExecSQL with stringparams like that:

Code: Select all

  IBCConnection1.Open;
  IBCConnection1.ExecSQL('select * from rdb$database where rdb$database.rdb$security_class = :rdb$text', ['asdf']);
  IBCConnection1.Close;
I recive the exception:
Dynamic SQL Error
SQL error code = -303
arithmetic exception, numeric overflow, or string truncation
string right truncation
If I do this with a IBCQuery-Object it works:

Code: Select all

  IBCConnection1.Open;
  IBCQuery1.sql.Text := 'select * from rdb$database where rdb$database.rdb$security_class = :text';
  IBCQuery1.ParamByName('text').AsString := 'ASD';
  IBCQuery1.ExecSQL;
  IBCQuery1.Close;
  IBCConnection1.Close;
I tried it with a Dialect 3/UTF8-DB and with a Dialect 1/WIN1252-DB.

What do I wrong?

Regards, Jan

Re: IBCConnection.ExecSQL with stringparam - string right truncation

Posted: Thu 08 Oct 2015 10:50
by ViktorV
Thank you for the information. We have reproduced the issue. We are investigating this behavior of IBDAC, and we will inform you about the results.