Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread 1011 error on adding to much text to a field
Tue, Dec 4 2007 11:21 PMPermanent Link

Michael Fullerton
Suppose you have a table with a 15 char text field if you try to add a
record (using an APPEND query) that puts more than 15 chars to that
field. An exception will be generated. Shouldn't EDB just truncate the
text instead of raising an exception? Thats what happens when you use
AppendRecord instead of an APPEND query.
Wed, Dec 5 2007 4:44 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Michael,

<< Suppose you have a table with a 15 char text field if you try to add a
record (using an APPEND query) that puts more than 15 chars to that field.
An exception will be generated. Shouldn't EDB just truncate the text instead
of raising an exception? >>

No, according to the SQL 2003 standard, any time a value assignment is
truncated or out of range, an exception or warning should be raised.

<< Thats what happens when you use AppendRecord instead of an APPEND query.
>>

AppendRecord calls the same internal functionality to set the field values,
so it should also raise an error.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image