TD4.2 Unexpected String Truncation With Table Columns

forum.gupta.bugreport (2005-2010)
NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

TD4.2 Unexpected String Truncation With Table Columns

Post by NewsgroupServer » 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

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

TD4.2 Unexpected String Truncation With Table Columns

Post by NewsgroupServer » 11 Jan 2008, 08:30

 Posted by:  Christof Helm 


.head 0 + Application Description: Gupta SQLWindows Standard Application Template
.head 1 - Outline Version - 4.0.28
.head 1 + Design-time Settings
.data VIEWINFO
0000: 6F00000001000000 FFFF01000D004347 5458566965775374 6174650400010000
0020: 0000000000A50000 002C000000020000 0003000000FFFFFF FFFFFFFFFFFCFFFF
0040: FFE9FFFFFFFFFFFF FF000000007C0200 004D010000010000 0001000000010000
0060: 000F4170706C6963 6174696F6E497465 6D00000000
.enddata
.head 2 - Outline Window State: Normal
.head 2 + Outline Window Location and Size
.data VIEWINFO
0000: 6600040003002D00 0000000000000000 0000B71E5D0E0500 1D00FFFF4D61696E
0020: 0000000000000000 0000000000000000 0000003B00010000 00000000000000E9
0040: 1E800A00008600FF FF496E7465726E61 6C2046756E637469 6F6E730000000000
0060: 0000000000000000 0000000000003200 0100000000000000 0000E91E800A0000
0080: DF00FFFF56617269 61626C6573000000 0000000000000000 0000000000000000
00A0: 3000010000000000 00000000F51E100D 0000F400FFFF436C 6173736573000000
00C0: 0000000000000000 0000000000000000
.enddata
.data VIEWSIZE
0000: D000
.enddata
.head 3 - Left: -0.013"
.head 3 - Top: 0.0"
.head 3 - Width: 8.013"
.head 3 - Height: 4.969"
.head 2 + Options Box Location
.data VIEWINFO
0000: D4180909B80B1A00
.enddata
.data VIEWSIZE
0000: 0800
.enddata
.head 3 - Visible? Yes
.head 3 - Left: 4.15"
.head 3 - Top: 1.885"
.head 3 - Width: 3.8"
.head 3 - Height: 2.073"
.head 2 + Class Editor Location
.head 3 - Visible? No
.head 3 - Left: 0.575"
.head 3 - Top: 0.094"
.head 3 - Width: 5.063"
.head 3 - Height: 2.719"
.head 2 + Tool Palette Location
.head 3 - Visible? No
.head 3 - Left: 6.388"
.head 3 - Top: 0.729"
.head 2 - Fully Qualified External References? Yes
.head 2 - Reject Multiple Window Instances? No
.head 2 - Enable Runtime Checks Of External References? Yes
.head 2 - Use Release 4.0 Scope Rules? No
.head 1 - Libraries
.head 1 + Global Declarations
.head 2 + Window Defaults
.head 3 + Tool Bar
.head 4 - Display Style? Etched
.head 4 - Font Name: MS Sans Serif
.head 4 - Font Size: 8
.head 4 - Font Enhancement: System Default
.head 4 - Text Color: System Default
.head 4 - Background Color: System Default
.head 3 + Form Window
.head 4 - Display Style? Etched
.head 4 - Font Name: MS Sans Serif
.head 4 - Font Size: 8
.head 4 - Font Enhancement: System Default
.head 4 - Text Color: System Default
.head 4 - Background Color: System Default
.head 3 + Dialog Box
.head 4 - Display Style? Etched
.head 4 - Font Name: MS Sans Serif
.head 4 - Font Size: 8
.head 4 - Font Enhancement: System Default
.head 4 - Text Color: System Default
.head 4 - Background Color: System Default
.head 3 + Top Level Table Window
.head 4 - Font Name: MS Sans Serif
.head 4 - Font Size: 8
.head 4 - Font Enhancement: System Default
.head 4 - Text Color: System Default
.head 4 - Background Color: System Default
.head 3 + Data Field
.head 4 - Font Name: Use Parent
.head 4 - Font Size: Use Parent
.head 4 - Font Enhancement: Use Parent
.head 4 - Text Color: Use Parent
.head 4 - Background Color: Use Parent
.head 3 + Multiline Field
.head 4 - Font Name: Use Parent
.head 4 - Font Size: Use Parent
.head 4 - Font Enhancement: Use Parent
.head 4 - Text Color: Use Parent
.head 4 - Background Color: Use Parent
.head 3 + Spin Field
.head 4 - Font Name: Use Parent
.head 4 - Font Size: Use Parent
.head 4 - Font Enhancement: Use Parent
.head 4 - Text Color: Use Parent
.head 4 - Background Color: Use Parent
.head 3 + Background Text
.head 4 - Font Name: Use Parent
.head 4 - Font Size: Use Parent
.head 4 - Font Enhancement: Use Parent
.head 4 - Text Color: Use Parent
.head 4 - Background Color: Use Parent
.head 3 + Pushbutton
.head 4 - Font Name: Use Parent
.head 4 - Font Size: Use Parent
.head 4 - Font Enhancement: Use Parent
.head 3 + Radio Button
.head 4 - Font Name: Use Parent
.head 4 - Font Size: Use Parent
.head 4 - Font Enhancement: Use Parent
.head 4 - Text Color: Use Parent
.head 4 - Background Color: Use Parent
.head 3 + Check Box
.head 4 - Font Name: Use Parent
.head 4 - Font Size: Use Parent
.head 4 - Font Enhancement: Use Parent
.head 4 - Text Color: Use Parent
.head 4 - Background Color: Use Parent
.head 3 + Option Button
.head 4 - Font Name: Use Parent
.head 4 - Font Size: Use Parent
.head 4 - Font Enhancement: Use Parent
.head 3 + Group Box
.head 4 - Font Name: Use Parent
.head 4 - Font Size: Use Parent
.head 4 - Font Enhancement: Use Parent
.head 4 - Text Color: Use Parent
.head 4 - Background Color: Use Parent
.head 3 + Child Table Window
.head 4 - Font Name: Use Parent
.head 4 - Font Size: Use Parent
.head 4 - Font Enhancement: Use Parent
.head 4 - Text Color: Use Parent
.head 4 - Background Color: Use Parent
.head 3 + List Box
.head 4 - Font Name: Use Parent
.head 4 - Font Size: Use Parent
.head 4 - Font Enhancement: Use Parent
.head 4 - Text Color: Use Parent
.head 4 - Background Color: Use Parent
.head 3 + Combo Box
.head 4 - Font Name: Use Parent
.head 4 - Font Size: Use Parent
.head 4 - Font Enhancement: Use Parent
.head 4 - Text Color: Use Parent
.head 4 - Background Color: Use Parent
.head 3 + Line
.head 4 - Line Color: Use Parent
.head 3 + Frame
.head 4 - Border Color: Use Parent
.head 4 - Background Color: 3D Face Color
.head 3 + Picture
.head 4 - Border Color: Use Parent
.head 4 - Background Color: Use Parent
.head 2 + Formats
.head 3 - Number: 0'%'
.head 3 - Number: #0
.head 3 - Number: ###000
.head 3 - Number: ###000;'($'###000')'
.head 3 - Date/Time: hh:mm:ss AMPM
.head 3 - Date/Time: M/d/yy
.head 3 - Date/Time: MM-dd-yy
.head 3 - Date/Time: dd-MMM-yyyy
.head 3 - Date/Time: MMM d, yyyy
.head 3 - Date/Time: MMM d, yyyy hh:mm AMPM
.head 3 - Date/Time: MMMM d, yyyy hh:mm AMPM
.head 2 - External Functions
.head 2 + Constants
.data CCDATA
0000: 3000000000000000 0000000000000000 00000000
.enddata
.data CCSIZE
0000: 1400
.enddata
.head 3 - System
.head 3 - User
.head 3 - Enumerations
.head 2 - Resources
.head 2 - Variables
.head 2 - Internal Functions
.head 2 - Named Menus
.head 2 - Class Definitions
.head 2 + Default Classes
.head 3 - MDI Window: cBaseMDI
.head 3 - Form Window:
.head 3 - Dialog Box:
.head 3 - Table Window:
.head 3 - Quest Window:
.head 3 - Data Field:
.head 3 - Spin Field:
.head 3 - Multiline Field:
.head 3 - Pushbutton:
.head 3 - Radio Button:
.head 3 - Option Button:
.head 3 - Check Box:
.head 3 - Child Table:
.head 3 - Quest Child Window: cQuickDatabase
.head 3 - List Box:
.head 3 - Combo Box:
.head 3 - Picture:
.head 3 - Vertical Scroll Bar:
.head 3 - Horizontal Scroll Bar:
.head 3 - Column:
.head 3 - Background Text:
.head 3 - Group Box:
.head 3 - Line:
.head 3 - Frame:
.head 3 - Custom Control:
.head 3 - ActiveX:
.head 2 + Application Actions
.head 3 + On SAM_AppStartup
.head 4 - Call SalModalDialog( dlgTest, hWndNULL )
.head 1 + Dialog Box: dlgTest
.head 2 - Class:
.head 2 - Property Template:
.head 2 - Class DLL Name:
.head 2 - Title:
.head 2 - Accessories Enabled? No
.head 2 - Visible? Yes
.head 2 - Display Settings
.head 3 - Display Style? Default
.head 3 - Visible at Design time? Yes
.head 3 - Type of Dialog: Modal
.head 3 - Window Location and Size
.head 4 - Left: Default
.head 4 - Top: Default
.head 4 - Width: Default
.head 4 - Width Editable? Yes
.head 4 - Height: Default
.head 4 - Height Editable? Yes
.head 3 - Absolute Screen Location? Yes
.head 3 - Font Name: Default
.head 3 - Font Size: Default
.head 3 - Font Enhancement: Default
.head 3 - Text Color: Default
.head 3 - Background Color: Default
.head 2 - Description:
.head 2 + Tool Bar
.head 3 - Display Settings
.head 4 - Display Style? Default
.head 4 - Location? Top
.head 4 - Visible? Yes
.head 4 - Size: Default
.head 4 - Size Editable? Yes
.head 4 - Font Name: Default
.head 4 - Font Size: Default
.head 4 - Font Enhancement: Default
.head 4 - Text Color: Default
.head 4 - Background Color: Default
.head 3 - Contents
.head 2 + Contents
.head 3 + Child Table: tblTest
.head 4 - Class Child Ref Key: 0
.head 4 - Class ChildKey: 0
.head 4 - Class:
.head 4 - Property Template:
.head 4 - Class DLL Name:
.head 4 - Display Settings
.head 5 - Window Location and Size
.head 6 - Left: Default
.head 6 - Top: Default
.head 6 - Width: 6.483"
.head 6 - Width Editable? Yes
.head 6 - Height: 1.738"
.head 6 - Height Editable? Yes
.head 5 - Visible? Yes
.head 5 - Font Name: Default
.head 5 - Font Size: Default
.head 5 - Font Enhancement: Default
.head 5 - Text Color: Default
.head 5 - Background Color: Default
.head 5 - View: Table
.head 5 - Allow Row Sizing? No
.head 5 - Lines Per Row: Default
.head 4 - Memory Settings
.head 5 - Maximum Rows in Memory: Default
.head 5 - Discardable? Yes
.head 4 + Contents
.head 5 + Column: colText1
.head 6 - Class Child Ref Key: 0
.head 6 - Class ChildKey: 0
.head 6 - Class:
.head 6 - Property Template:
.head 6 - Class DLL Name:
.head 6 - Title: Text1 (250)
.head 6 - Visible? Yes
.head 6 - Editable? No
.head 6 - Maximum Data Length: 250
.head 6 - Data Type: String
.head 6 - Justify: Left
.head 6 - Width: Default
.head 6 - Width Editable? Yes
.head 6 - Format: Unformatted
.head 6 - Country: Default
.head 6 - Input Mask: Unformatted
.head 6 - Cell Options
.head 7 - Cell Type? Standard
.head 7 - Multiline Cell? No
.head 7 - Cell DropDownList
.head 8 - Sorted? Yes
.head 8 - Vertical Scroll? Yes
.head 8 - Auto Drop Down? No
.head 8 - Allow Text Editing? Yes
.head 7 - Cell CheckBox
.head 8 - Check Value:
.head 8 - Uncheck Value:
.head 8 - Ignore Case? Yes
.head 6 - List Values
.head 6 - Message Actions
.head 5 + Column: colText2 (40)
.head 6 - Class Child Ref Key: 0
.head 6 - Class ChildKey: 0
.head 6 - Class:
.head 6 - Property Template:
.head 6 - Class DLL Name:
.head 6 - Title: Text2
.head 6 - Visible? Yes
.head 6 - Editable? No
.head 6 - Maximum Data Length: 40
.head 6 - Data Type: String
.head 6 - Justify: Left
.head 6 - Width: Default
.head 6 - Width Editable? Yes
.head 6 - Format: Unformatted
.head 6 - Country: Default
.head 6 - Input Mask: Unformatted
.head 6 - Cell Options
.head 7 - Cell Type? Standard
.head 7 - Multiline Cell? No
.head 7 - Cell DropDownList
.head 8 - Sorted? Yes
.head 8 - Vertical Scroll? Yes
.head 8 - Auto Drop Down? No
.head 8 - Allow Text Editing? Yes
.head 7 - Cell CheckBox
.head 8 - Check Value:
.head 8 - Uncheck Value:
.head 8 - Ignore Case? Yes
.head 6 - List Values
.head 6 - Message Actions
.head 4 - Functions
.head 4 - Window Variables
.head 4 - Message Actions
.head 3 + Pushbutton: pbInsertRow
.head 4 - Class Child Ref Key: 0
.head 4 - Class ChildKey: 0
.head 4 - Class:
.head 4 - Property Template:
.head 4 - Class DLL Name:
.head 4 - Title: Insert Row
.head 4 - Window Location and Size
.head 5 - Left: 0.083"
.head 5 - Top: 1.821"
.head 5 - Width: 1.2"
.head 5 - Width Editable? Yes
.head 5 - Height: 0.214"
.head 5 - Height Editable? Yes
.head 4 - Visible? Yes
.head 4 - Keyboard Accelerator: (none)
.head 4 - Font Name: Default
.head 4 - Font Size: Default
.head 4 - Font Enhancement: Default
.head 4 - Picture File Name:
.head 4 - Picture Transparent Color: None
.head 4 - Image Style: Single
.head 4 - Text Color: Default
.head 4 - Background Color: Default
.head 4 + Message Actions
.head 5 + On SAM_Click
.head 6 - Call InsertRow( )
.head 3 + Pushbutton: pbClose
.head 4 - Class Child Ref Key: 0
.head 4 - Class ChildKey: 0
.head 4 - Class:
.head 4 - Property Template:
.head 4 - Class DLL Name:
.head 4 - Title: Close
.head 4 - Window Location and Size
.head 5 - Left: 5.283"
.head 5 - Top: 1.821"
.head 5 - Width: 1.2"
.head 5 - Width Editable? Yes
.head 5 - Height: 0.214"
.head 5 - Height Editable? Yes
.head 4 - Visible? Yes
.head 4 - Keyboard Accelerator: (none)
.head 4 - Font Name: Default
.head 4 - Font Size: Default
.head 4 - Font Enhancement: Default
.head 4 - Picture File Name:
.head 4 - Picture Transparent Color: None
.head 4 - Image Style: Single
.head 4 - Text Color: Default
.head 4 - Background Color: Default
.head 4 + Message Actions
.head 5 + On SAM_Click
.head 6 - Call SalEndDialog( hWndForm, IDOK )
.head 2 + Functions
.head 3 + Function: InsertRow
.head 4 - Description:
.head 4 - Returns
.head 4 - Parameters
.head 4 - Static Variables
.head 4 + Local variables
.head 5 - String: l_sText
.head 5 - Number: l_nRow
.head 4 + Actions
.head 5 - Set l_sText = "xxxxx(10) xxxxx(20) xxxxx(30) xxxxx(40) xxxxx(50) xxxxx(60) xxxxx(70) xxxxx(80) xxxxx(90) xxxx(100)"
.head 5 - Call SalTblSetContext( tblTest, SalTblInsertRow( tblTest, TBL_MaxRow ) )
.head 5 - !
.head 5 - Set tblTest.colText1 = l_sText
.head 5 - Set tblTest.colText2 = l_sText
.head 5 - !
.head 5 - Call SalMessageBox( l_sText, "Remaining String", MB_Ok )
.head 2 - Window Parameters
.head 2 - Window Variables
.head 2 - Message Actions

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

TD4.2 Unexpected String Truncation With Table Columns

Post by NewsgroupServer » 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/

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

TD4.2 Unexpected String Truncation With Table Columns

Post by NewsgroupServer » 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

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

TD4.2 Unexpected String Truncation With Table Columns

Post by NewsgroupServer » 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.unify.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 [Crawler] and 0 guests