Board index » delphi » Cannot retrieve MS-SQLServer VARCHAR(n>255) or TEXT field in Delphi program

Cannot retrieve MS-SQLServer VARCHAR(n>255) or TEXT field in Delphi program

Help,

I cannot retrieve the data from a MS-SQLServer VARCHAR(n>255) or TEXT field
in my Delphi program. I've tried all combinations of
  MmoChangeLog.Text :=
  MmoChangeLog.Assign()
  MmoChangeLog.Lines.Add()
  MmoChangeLog.Lines.AddStrings()
left of the assignment, and
  Fields[0].AsVariant;
  Fields[0].AsString;
  Fields[0].VAlue;
  Fields[0].Text;
right of the assignment,
but nothing seems to work.
The data are retrieved with a query:
 SELECT MUT_DESCRIP FROM MUTSTRU WHERE MUT_ID=15

It almost looks like a FAQ, but so far I haven't found anything.
Who can help me out?

TIA
Jan Doggen

 

Re:Cannot retrieve MS-SQLServer VARCHAR(n>255) or TEXT field in Delphi program


Quote
Jan Doggen wrote:
> Help,

> I cannot retrieve the data from a MS-SQLServer VARCHAR(n>255) or TEXT
> field in my Delphi program. I've tried all combinations of
>   MmoChangeLog.Text :=
>   MmoChangeLog.Assign()
>   MmoChangeLog.Lines.Add()
>   MmoChangeLog.Lines.AddStrings()
> left of the assignment, and
>   Fields[0].AsVariant;
>   Fields[0].AsString;
>   Fields[0].VAlue;
>   Fields[0].Text;
> right of the assignment,
> but nothing seems to work.
> The data are retrieved with a query:
>  SELECT MUT_DESCRIP FROM MUTSTRU WHERE MUT_ID=15

You may have to use a TBlobStream object to handle LONGVARCHAR data.  This
actually goes back to the definition of ODBC itself.

----------------------------------
Fast automatic Paradox/Delphi table repair at a click of a mouse!
http://www.sundialservices.com/products/chimneysweep

Other Threads