I'm in the process of porting our app from 7.6 to 7.9. One issue I found
is that OracleSession uses a printString representation for Floats in the binding process with Oracle (see below). This was introduced with vw7.8. The effect is that Floats don't work with me anymore. I get the Oracle error "no number found", which is probably a NLS problem with representing a float as #printString which doesn't match the actual client locale for the database. If I comment out the line, binding works again as it did before with 7.6. So it seems superfluous to me because Floats can also be bound and I would like to know what caused the method to be changed in that way. Can anyone share some information why this was done? Thanks in advance Thomas bindInputValues "Last programmer: Thomas Brodt (26.07.12, 17:34:53)" "Creator: Unknown" "Return: <>" "Bind input values in bindInput." self bindInput isNil ifFalse: [ self bindPrepare. "For each bind marker in the query fragments, get the corresponding value from the bindInput object. If the value isn't already bound, bind and remember it." 2 to: queryFragments size by: 2 do: [:index | | bindMarker value | bindMarker := queryFragments at: index. value := self inBindInputAt: bindMarker. ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" "VW7.9 uses printString for Float ????" "value oracleConversion == #Float ifTrue: [value := value printString]." "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" bindMarker isInteger ifTrue: [ | bindPosition | bindPosition := index / 2. (self boundValueAt: bindPosition is: value) ifFalse: [ self bindValue: value at: bindPosition. self bindValues at: bindPosition put: value]] ifFalse: [ (self boundValueAt: bindMarker is: value) ifFalse: [ self bindValue: value at: bindMarker. self bindValues at: bindMarker put: value]]]] _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
I don't have the details at the moment, but that change was introduced
to alleviate complaints about floating point resolution. Oracle recommends printing to a string and binding that. There are reported problems with locale printing, so the issue may soon see an AR. We could use your information for a reproducing the effect. Thanks, - Dave -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Thomas Brodt Sent: Thursday, July 26, 2012 8:46 AM To: VWNC Subject: [vwnc] [vw7.9][OracleEXDI] OracleSession bindInputValues uses printString for Floats? I'm in the process of porting our app from 7.6 to 7.9. One issue I found is that OracleSession uses a printString representation for Floats in the binding process with Oracle (see below). This was introduced with vw7.8. The effect is that Floats don't work with me anymore. I get the Oracle error "no number found", which is probably a NLS problem with representing a float as #printString which doesn't match the actual client locale for the database. If I comment out the line, binding works again as it did before with 7.6. So it seems superfluous to me because Floats can also be bound and I would like to know what caused the method to be changed in that way. Can anyone share some information why this was done? Thanks in advance Thomas bindInputValues "Last programmer: Thomas Brodt (26.07.12, 17:34:53)" "Creator: Unknown" "Return: <>" "Bind input values in bindInput." self bindInput isNil ifFalse: [ self bindPrepare. "For each bind marker in the query fragments, get the corresponding value from the bindInput object. If the value isn't already bound, bind and remember it." 2 to: queryFragments size by: 2 do: [:index | | bindMarker value | bindMarker := queryFragments at: index. value := self inBindInputAt: bindMarker. ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" "VW7.9 uses printString for Float ????" "value oracleConversion == #Float ifTrue: [value := value printString]." "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" bindMarker isInteger ifTrue: [ | bindPosition | bindPosition := index / 2. (self boundValueAt: bindPosition is: value) ifFalse: [ self bindValue: value at: bindPosition. self bindValues at: bindPosition put: value]] ifFalse: [ (self boundValueAt: bindMarker is: value) ifFalse: [ self bindValue: value at: bindMarker. self bindValues at: bindMarker put: value]]]] _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
On 26.07.2012 19:00, Wallen, David wrote:
> I don't have the details at the moment, but that change was introduced > to alleviate complaints about floating point resolution. Oracle > recommends printing to a string and binding that. There are reported > problems with locale printing, so the issue may soon see an AR. We could > use your information for a reproducing the effect. > Thanks, > - Dave Just to verify, there are errors in 7.7.1 as well when storing floats from a machine with non-american locale, like NLS_LANG=NORWAY_NORWEGIAN.UTF8 If support for Oracle < 9.2 can be dropped (8.1.7 ended extended support in 2006...), it would be nice to have it rewritten in a more modern fashion according to http://docs.oracle.com/cd/E11882_01/server.112/e10729/ch10oci.htm , where character sets are determined and set by VW using a combination of OCIEnvNlsCreate and OCINlsCharSetNameTold irregardless of environmental variables, while proper numeric/date etc. formats would be accounted for using the values gained through OCINlsGetInfo. No more jumping through hoops to get a NLS_LANG encoding whose conversion VW may or may not support, and data formatting automatically adjusted for the Oracle locales, woo! Cheers, Henry _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Having to rely on NLS_LANG is real PITA, so I would appreciate all efforts to revamp the Oracle EXDI |
+1
Holger Kleinsorgen <[hidden email]> schrieb: > >Henrik Sperre Johansen wrote >> >> No more jumping through hoops to get a NLS_LANG encoding whose >> conversion VW may or may not support, and data formatting >automatically >> adjusted for the Oracle locales, woo >> > >Having to rely on NLS_LANG is real PITA, so I would appreciate all >efforts >to revamp the Oracle EXDI > _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |