Recent

Author Topic: TMemDataSet doesn't support ftMemo field  (Read 2328 times)

vladvons

  • Jr. Member
  • **
  • Posts: 65
TMemDataSet doesn't support ftMemo field
« on: October 19, 2013, 03:32:09 pm »
PostgreSQL table has a TEXT field.
TSQLQuery reads some data from table.

Now i want to clone TSQLQuery into TMemDataSet
TMemDataSet.CopyFromDataset()
MDSError: field doesnt suport!

How to clone DataSet with ftMemo field into MemDataSet?

Or schould i use another field type in PostgreSQL to store text data?
For my purpose  ftString (2^32 bytes) is more than enough.

« Last Edit: October 19, 2013, 03:46:07 pm by vladvons »
Windows 7, Ubuntu 12.04, Lazarus 1.2.2, FPC 2.6.4, PostgreSQL 9.2

LacaK

  • Hero Member
  • *****
  • Posts: 605
Re: TMemDataSet doesn't support ftMemo field
« Reply #1 on: October 21, 2013, 02:29:10 pm »
you can try cast TEXT to VARCHAR

vladvons

  • Jr. Member
  • **
  • Posts: 65
Re: TMemDataSet doesn't support ftMemo field
« Reply #2 on: October 21, 2013, 03:58:58 pm »
thanks LacaK,
if you mean SQL casting, this doesnt suit for my DB engine conception
Code: [Select]
SELECT 
  CAST (Description AS VARCHAR (10000)) AS DescriptionCasted
FROM
....
« Last Edit: October 21, 2013, 04:07:06 pm by vladvons »
Windows 7, Ubuntu 12.04, Lazarus 1.2.2, FPC 2.6.4, PostgreSQL 9.2

 

TinyPortal © 2005-2018