Thread View: borland.public.delphi.migration
3 messages
3 total messages
Started by Richard Stephens
Fri, 17 Aug 2007 17:08
Assign method does not work from TMemo.Lines to NText field
Author: Richard Stephens
Date: Fri, 17 Aug 2007 17:08
Date: Fri, 17 Aug 2007 17:08
18 lines
1568 bytes
1568 bytes
I am migrating from D5 Enterprise to D2006 Enterprise.
My application uses SQL server (2005) through a TADOTable.
In Delphi 5, if I use the assign method to copy the lines from a TMemo
object into a SQL NText field, it works perfectly. An example expression
would be:
ADOTable.FieldByName('TestField').Assign(Memo.Lines);
Where "TestField" is defined as NText in SQL Server.
In D2006, this assigns absolute jibberish to the NText field.
I have applied all D2006 updates and hot fixes through #13....but the assign
method still does not work.
Richard Stephens
Re: Assign method does not work from TMemo.Lines to NText field
Author: Richard Stephens
Date: Fri, 17 Aug 2007 18:26
Date: Fri, 17 Aug 2007 18:26
14 lines
1455 bytes
1455 bytes
I found that if I create a TDBMemo field and point it to my TADOTable
"TestField" NText field, that the following will work:
DBMemo.Lines := Memo.Lines;
However....I believe that I should have been able to continue to use the
assign method:
ADOTable.FieldByName('TestField').Assign(Memo.Lines);
...as I did before in D5.
Richard
Re: Assign method does not work from FieldByName into an NText field
Author: Richard Stephens
Date: Mon, 20 Aug 2007 17:53
Date: Mon, 20 Aug 2007 17:53
4 lines
1142 bytes
1142 bytes
This problem is more widespread than I thought.
Any "FieldByName('ntextfield').Assign" fails miserably by storing garbage
into the field.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads