UniQuery or UniTable returning only first 40 characters from DB Field

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ninadgac
Posts: 4
Joined: Sun 13 Oct 2013 06:18

UniQuery or UniTable returning only first 40 characters from DB Field

Post by ninadgac » Mon 18 Nov 2013 15:29

I am using UniTable & UniQuery to extract data from database. At my DB Table there is one field/column named as Description which contains string data type. But when I extracted data from Database table using UniQuery or UniTable it is returning only first 40 characters from Description field.

I also checked the fact using following code

Code: Select all

 
  UniQuery1.First;
  while Not UniQuery1.Eof do
  begin
    if Length(UniQuery1.FieldByName('description').AsString) > 40 then
       ShowMessage(UniQuery1.FieldByName('description').AsString);
    UniQuery1.Next;
  end;
Any solution to this problem? What should be missing ?

AndreyZ

Re: UniQuery or UniTable returning only first 40 characters from DB Field

Post by AndreyZ » Mon 18 Nov 2013 16:05

Please specify the provider (TUniConnection.ProviderName) you are working with.

ninadgac
Posts: 4
Joined: Sun 13 Oct 2013 06:18

Re: UniQuery or UniTable returning only first 40 characters from DB Field

Post by ninadgac » Mon 18 Nov 2013 17:59

UniProvider name was SQLiteUniProvider. I am using SQLite DB.

Problem sorted out, in DB table description field was declared as

description varchar ( 40 )

edited it as

description varchar ( 200 ) or greater.

AndreyZ

Re: UniQuery or UniTable returning only first 40 characters from DB Field

Post by AndreyZ » Tue 19 Nov 2013 06:48

It is good to see that this problem has been solved. Feel free to contact us if you have any further questions about UniDAC.

Post Reply