Discussion:
Text fields are truncated to 1024 with more than one text/memo field in Dataset
(too old to reply)
JeffreyK
2007-06-01 23:15:03 UTC
Permalink
When retreiving multiple text fields (memo) from a MS SQL Server database
only the first 1024 characters are retreived from the text field.
If the SELECT statement contains ONE text field, it is retreived properly,
the entire data is there.

This worked fine with my apps created in Delphi 7, but now that I am using
Delphi 2007 this problem arises.

I am using a DBExpress SQLConnection to connect to the SQL Server.
ClientDataSet --> DataSetProvider --> SQLDataSet --> SQLConnection

The application will successfully insert more than 1024 characters into the
Memo field, and can save it to the DB. But when reading the record, only the
first 1024 chars are returned.

Create table TestTable ( PK int, PrivateNotes text, PublicNotes text )

The CommandText of ClientDataSet is
Select PK, PrivateNotes, PublicNotes from TestTable where PK = :PK

The Notes fields are truncated at 1024 characters.
When I changed the CommandText to
Select PK, PrivateNotes from TestTable where PK = :PK
I was able to retrieve the entire content of the PrivateNotes, they were not
truncated.


Any help would be greatly appreciated.
Thanks!
Bill Todd
2007-06-02 02:59:40 UTC
Permalink
Have you logged this in QC with a reproducible test case? If not,
please do.
--
Bill Todd (TeamB)
JeffreyK
2007-06-05 05:21:54 UTC
Permalink
I have logged it in QC with an attached project to recreate the problem.

http://qc.codegear.com/wc/qcmain.aspx?d=47021
Post by Bill Todd
Have you logged this in QC with a reproducible test case? If not,
please do.
--
Bill Todd (TeamB)
hermann
2007-10-16 00:55:47 UTC
Permalink
I have exactly the same problem.
only with msserver(mysql worksfine)
and only if more then one blobfield!
no answer within 4 Months?
or could it be the version of dbxmss30.dll?
using only sqlconnection and sqldataset raises the problem too.
Post by JeffreyK
When retreiving multiple text fields (memo) from a MS SQL Server database
only the first 1024 characters are retreived from the text field.
If the SELECT statement contains ONE text field, it is retreived properly,
the entire data is there.
This worked fine with my apps created in Delphi 7, but now that I am using
Delphi 2007 this problem arises.
I am using a DBExpress SQLConnection to connect to the SQL Server.
ClientDataSet --> DataSetProvider --> SQLDataSet --> SQLConnection
The application will successfully insert more than 1024 characters into the
Memo field, and can save it to the DB. But when reading the record, only the
first 1024 chars are returned.
Create table TestTable ( PK int, PrivateNotes text, PublicNotes text )
The CommandText of ClientDataSet is
Select PK, PrivateNotes, PublicNotes from TestTable where PK = :PK
The Notes fields are truncated at 1024 characters.
When I changed the CommandText to
Select PK, PrivateNotes from TestTable where PK = :PK
I was able to retrieve the entire content of the PrivateNotes, they were not
truncated.
Any help would be greatly appreciated.
Thanks!
Loading...