Subject | Re: [firebird-support] Re: fail when checking VarChar variable <> '' |
---|---|
Author | Helen Borrie |
Post date | 2006-12-07T21:05:37Z |
At 01:50 AM 8/12/2006, you wrote:
local variable but, at the very least, it's not valid to declare a
collation sequence for a variable without declaring the character set
that it is applicable to.
declare variable Internalmemo VarChar(2000) CHARACTER SET ISO8859_1
(without the quotes: it's an identifier)
My data is ISO-8859-1 so everything is single byte. I don't think I
335544565 isc_transliteration_failed, "Cannot transliterate character
between character sets"? Absurd as it may seem, you get both
exceptions when there is a transliteration error. Your exception
handling for strings should test for both.
around the character set identifier.
./heLen
>Thanks Helen,I don't believe it is possible to declare a COLLATE attribute for a
>
>Actually the missing ':'InternalMemo was a typo, it did exist in my
>SP.
>
>I am traveling without your book right now, but I don't see how to
>add a collation to my variable declaration.
local variable but, at the very least, it's not valid to declare a
collation sequence for a variable without declaring the character set
that it is applicable to.
>I triedThe attribute you want is not COLLATE but CHARACTER SET:
>
>declare variable Internalmemo VarChar(2000) Collate 'ISO8859_1'
declare variable Internalmemo VarChar(2000) CHARACTER SET ISO8859_1
(without the quotes: it's an identifier)
My data is ISO-8859-1 so everything is single byte. I don't think I
>can overflow in this case,Correct. Are you sure you are not also receiving isc errorcode
335544565 isc_transliteration_failed, "Cannot transliterate character
between character sets"? Absurd as it may seem, you get both
exceptions when there is a transliteration error. Your exception
handling for strings should test for both.
>however in this specific case the data isDon't confuse character set and collation. And don't put quotes
>only about 500 char long, so there is absolutely no possibility.
>
>If I leave off the "if (InternalMemo <> '') test, all is well in the
>sp.
>
>
>How to add the collation to the variable with FB 1.5.3?
around the character set identifier.
./heLen