TD-4048: Remove distinction String - Long String

Missing or incomplete OpenText Gupta product features? Discuss it here!
johi

TD-4048: Remove distinction String - Long String

Post by johi » 19 Nov 2007, 18:29

If a column longer than 254 chars is fetched into a normal String,

String is empty. If a column shorter than 254 chars is fetched into a Long String, an error message is triggered. Or was it the other way round?

Anyway, this is annoying and I do not understand why this distinction still exists in the new version.

Mike Vandine

Re: Remove distinction String - Long String

Post by Mike Vandine » 20 Nov 2007, 08:06

There is a distinction because they are two entirely different data types.

1. A string can hold up to 254 bytes of data.
2. A long string is used for data columns that are > 254 bytes.

This is a simple thing, but there is *definitely* a distinction. Long strings are used like BLOBs, Long Varchars, etc.

See the Developer's Guide.

johi

Re: Remove distinction String - Long String

Post by johi » 20 Nov 2007, 08:31

My post was an enhancement request, maybe shared by other developers, may be not.

I know about the current distinction, but I hoped with my colleagues that TD 5.1 would hide this internal distinction from the application level: Make it possible to use String for all character data without length restriction, allow Long String for compatibility.

What do you mean by "See the developers guide." ? No chance that Unify would ever think about my enhancement request?

Mike Vandine

Re: Remove distinction String - Long String

Post by Mike Vandine » 20 Nov 2007, 08:47

I'm sorry if I've offended you.

Thanks for the clarification about what you really would like to see. This forum is 'Enhancement Requests', but there are multiple products that we support that can be enhanced.

Please know that NO enhancement request is EVER dismissed offhand. With the additional information you've provided, we will certainly create an enhancement request on our tracking database and will certainly consider a change.

Best regards,

johi

Re: Remove distinction String - Long String

Post by johi » 20 Nov 2007, 10:12

communication Austria - Australia around the globe is still fascinating to me.

AndreasWagner

Re: Remove distinction String - Long String

Post by AndreasWagner » 20 Nov 2007, 10:28

There is no difference in Team Developer between string and long string. Only when we use string as into variable then there is that restriction.
So this enhancement request is just comprehensible.

GB

Re: Remove distinction String - Long String

Post by GB » 21 Nov 2007, 15:44

I fully support johi's enhancement request!!

Mike Vandine

Re: Remove distinction String - Long String

Post by Mike Vandine » 26 Nov 2007, 08:04

I have created enhancement request TD-4048 for this improvement suggestion.

Thanks!

User avatar
markus.essmayr
Austria
Posts: 892
Joined: 06 Mar 2017, 06:07
Location: Austria

Re: Remove distinction String - Long String

Post by markus.essmayr » 25 May 2009, 22:46

Hi Mike,

I also fully agree with this request, that the distinction between these two string types is often confusing.
And especially if you change the datatypes of database columns, you may need to change your code too.
It would really be great if this distinction moves away some time.

Are there any news on this on your side?

Thanks!
Max
Markus Eßmayr
teamdeveloper@t-mx.com

tlauzi

Re: Remove distinction String - Long String

Post by tlauzi » 25 May 2009, 23:43

Yes, Yes, Yes , Yes, I support this too.

Often we got problems, when we made a column bigger and run over the border of 254 chars, we had to change the code and replace the into string with a into long string. Sometimes we forgot to change to long string ,and the application crashed then, because of the "wrong" datatype :-(

Regards,
Thomas L.

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3388
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: Remove distinction String - Long String

Post by Dave Rabelink » 26 May 2009, 00:31

Yes, count me in for this enhancement request !
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Mike Vandine

Re: Remove distinction String - Long String

Post by Mike Vandine » 26 May 2009, 00:45

Look for this as a new feature in the TD5.2 release.

User avatar
Charlie
Canada
Posts: 646
Joined: 07 Mar 2017, 18:52
Location: Fredericton, New Brunswick, Canada

Re: Remove distinction String - Long String

Post by Charlie » 26 May 2009, 09:20

Hello,

Before I add myself to the long string of folk (sorry, bad pun) who want this...

Could somebody explain why we ever needed both types of String to start with? Explain the design decision/reasons?

What are the trade-offs in making this enhancement? Sure, makes coding easier, but at what "cost"???

Thanks, much appreciated.

Mike Vandine

Re: Remove distinction String - Long String

Post by Mike Vandine » 26 May 2009, 19:23

Currently the requirement is to bind fields above 254 bytes into long strings and fields below that number into standard strings. However, this is an artificial boundary and what really is a long string is not subject to an artificial boundary, but is a function of the data type, the database vendor and version, and the size of the column the user has declared. A long string may be as small as 255 bytes, or as large as 8,000 bytes, depending on the context.

So, the intent of this fix is to remove the 254-byte upper limit for the (non-long) String type, and allow users to bind strings to any column type or expression that is non-long.

The most important functional requirement of this change is that, while widening the size range that “short” strings will handle correctly, we do not change the current behavior of the product in other ways, especially if these changes will result in code changes for our customers. Read, 'backward compatible'!

So, there is no 'cost' to you of us making this improvement change.

johi

Re: Remove distinction String - Long String

Post by johi » 27 May 2009, 00:36

Hi Charlie, here are my thoughts about the reason for the original distinction.
In Windows 3.11, running on 16-bit CPU's, there was a huge performance advantage to keep data and local variables in one 64 KB segment. If you restrict string length to 254, you need to reserve only one byte in the string descriptor for the length.
So in 16-bit windows it made some sense to have a faster string data type for strings shorter than 254 characters.
The distinction could have been removed when SqlWindows was ported to 32-bit, maybe this was too complicated (modification of the SqlBase C-API and all underlying database routers) or nobody thought about it at Gupta/Centura.
Anyway, good news that the distinction will be removed in TD5.2!

Return to “Enhancement suggestions”

Who is online

Users browsing this forum: [Ccbot] and 0 guests