Hi,
I'm trying to convert a old application that uses BDE to use unidac instead using delphi XE5.
When I write blobs to the database then the blob gets truncated to 4000 characters.
I write to a clob field with a regular update query using TUniQuery by passing a parameter.
It's the TODBCUniProvider that truncates. TOracleUniProvider works. The old BDE application works and i wrote a C# application that uses System.Data.Odbc.OdbcConnection which also works so the odbc driver works for sure.
Any help would be appreciated.
Code
UniQuery1.sql.text := 'UPDATE tablename set xmldata=:xmldata WHERE id=4';
//UniQuery1.ParamByName('xmldata').LoadFromFile('c:\temp\myxmltest.xml',ftOraClob); // fails
//UniQuery1.ParamByName('xmldata').AsMemo := a_long_str; // fails
UniQuery1.ParamByName('xmldata').LoadFromFile('c:\temp\myxmltest.xml',ftBlob);
End code
Blob truncated with oracle odbc 11.02
Re: Blob truncated with oracle odbc 11.02
Hello,
This behaviour is due to the fact, that for some databases there is a parameter size restriction. Therefore we have added the DefaultStrParamSize option. Its size is 4000 by default. To solve the problem, you should set the correct parameter size, for example:
This behaviour is due to the fact, that for some databases there is a parameter size restriction. Therefore we have added the DefaultStrParamSize option. Its size is 4000 by default. To solve the problem, you should set the correct parameter size, for example:
Code: Select all
var
s: string;
begin
UniQuery1.sql.text := 'UPDATE tablename set xmldata=:xmldata WHERE id=4';
s := StringOfChar('c',5000);
UniQuery1.ParamByName('xmldata').Size := Length(s);
UniQuery1.ParamByName('xmldata').AsMemo := s;Re: Blob truncated with oracle odbc 11.02
Hi,
Thanks that solved my issues.
Thanks that solved my issues.
Re: Blob truncated with oracle odbc 11.02
Hello,
Glad to see that the problem was solved. If you have any other questions, feel free to contact us.
Glad to see that the problem was solved. If you have any other questions, feel free to contact us.