|
A program that has been functioning nicely for several months is now
having run-time issues after our weekend upgrade from v6.1 to v7.1, and
it appears to be related to my test for "if %subst(SQLSTATE : 1 : 2) =
'00';" Prior to today, that test was apparently satisfied after:
fetch from [cursor] into [host variable]
even though the variable from the cursor was longer than the host
variable target.
Today, the sqlstate gets a "01004" to inform me that "The value of a
string was truncated when assigned to another string data type with a
shorter length." So my if-test fails, and bad things happen. It's true
that the lengths are not matched, but if that had shown up in my testing
last March, I wouldn't be fixing production stuff today.
In the code below <<SNIPped>>
Because of SQLSTATE 01004, my EquipmentTypes array is no longer
getting loaded.
Did I reach a wrong conclusion that v7.1 is handling that
differently? <<SNIP>>
Got a lot of code out there that tests for
"if %subst(SQLSTATE : 1 : 2) = '00';"
Maybe not so much that involves
cursor-variable-to-host-variable-length-mismatch, but I sure got
blindsided here. Since I didn't find any references to "01004" in the
archives, I thought it might help someone else, unless I've totally
missed what's really causing my trouble.
This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.