TD4.2 Unexpected String Truncation With Table Columns

forum.gupta.bugreport (2005-2010)
Christof Helm

TD4.2 Unexpected String Truncation With Table Columns

Post by Christof Helm » 11 Jan 2008, 08:29

 Posted by:  Christof Helm 

When assigning a string variable to a table window column of type string
and the Max. Data Length attribute of the column is shorter than the
value of the string variable, the string variable will be truncated to
the length of the table window column.
This happens in TD4.2, the same in TD2.1 works correctly.

Can someone confirm this as a bug?

(The attached file demonstrates this behaviour and is a TD21 text mode
file.)

Thanks in advance
Christof

Christof Helm

TD4.2 Unexpected String Truncation With Table Columns

Post by Christof Helm » 11 Jan 2008, 08:30

 Posted by:  Christof Helm 

sample_txt.zip
You do not have the required permissions to view the files attached to this post.

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2168
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

TD4.2 Unexpected String Truncation With Table Columns

Post by Jeff Luther » 11 Jan 2008, 17:22

 Posted by:  Jeff Luther 

Not sure Unify visits here anymore to give you an official view,
Christof, but if you are asking for an opinion then I would say that
this is *not* a bug; the bug was in CTD v2.1 in not catching this
'over-write' issue. It just got fixed in v4.2.

If a 40-char TW column is mapped to a VARCHAR(40) DB column and used as
an INTO in a DML statement, a SQL error would result. I think the bug,
if you will, is in the SAL coding: it should be written to account for
the length of the string (in this case a column) var. so a SalStrLeftX()
or error to the user is made.

Thinking about it, frankly, we (SAL programmers) have had it too easy...
"String: sVar" is declared with no length attribute. Couldn't do that
with VB or C!

My 2 cents worth, anyway.

Best Regards,
Jeff @ PC Design
info. & samples: www.JeffLuther.net/unify/

Christof Helm

TD4.2 Unexpected String Truncation With Table Columns

Post by Christof Helm » 14 Jan 2008, 09:05

 Posted by:  Christof Helm 

Hi Jeff,

as far as i could see, they (Unify) only have bug forums for this new
version or did i miss something?

I agree with you partially, Jeff. Since String is in SAL a native
(built-in) datatype, assignments are done by *copying* values from
source object to target object. The source object should remain untouched.

Cheers
Christof

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2168
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

TD4.2 Unexpected String Truncation With Table Columns

Post by Jeff Luther » 14 Jan 2008, 17:46

 Posted by:  Jeff Luther 

"only have bug forums for this new version" Unify has a forum on their
site: http://support.guptatechnologies.com/supportforum/
for all types of issues, but it's there on the Unify site. My remark
("Not sure Unify visits here") means 'here,' in this gupta NG.

Thus, if this is/was a TD v5.1 issue you would want to report it there.
Likewise, I guess, for anything which might be an issue for < v5.1, they
have a forum area called "Older Releases" which looks like it has v4.2
and earlier issues posted in it.

"The source object should remain untouched" - I could not agree more! I
did not understand you to say that the *source* string was truncated;
only that the target field only received the string up to its max. data
length.

Best Regards,
Jeff @ PC Design
info. & samples: www.JeffLuther.net/unify/

Return to “gupta.bugreport”

Who is online

Users browsing this forum: [Ccbot] and 0 guests