JeffreyK
2007-06-01 23:15:03 UTC
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!
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!