Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, May 26, 2020 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Administration Forums - Database Administration
Forum to discuss SQL Server or Oracle database administration related to SalesLogix databases. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Database Administration | New ThreadView:  Search:  
 Author  Thread: Numeric DB Value not recognized?
Marty05
Posts: 68
 
Numeric DB Value not recognized?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Mar 14 1:07 AM

Hello,


I am facing a strange situation: we are upgrading Client OS from XP to Win7/32. DB is Oracle 10g using OLEDB provider which basically works.


But one script failes as follows:


select sum(x) as x from ...


in WinXP it returns in debugger:


rs.Fields(x).Value = -12,34
isNumeric(rs.Fields(x).Value) = true
Test of isNumeric function:
isNumeric(1,2) = Wrong number of arguments...
isNumeric(1.2) = True


Win 7: 
rs.Fields(x).Value = -12,34
isNumeric(rs.Fields(x).Value) = false
Test of isNumeric function:
isNumeric(1,2) = Wrong number of arguments...
isNumeric(1.2) = True



So isNumeric returns false in Win 7. I guess it must have something to do with numeric settings in Oracle? (, or . as comma)


select * from nls_session_parameters returns exact same values for both systems in sqlplus. (NLS_NUMERIC_CHARACTERS = .,)


What I really find strange is, that if I change the NLS_NUMERIC_CHARACHTERS to something else, in sqlplus it works, in SLX this setting is ignored. (e.g: NLS_NUM..=#,  then sqlplus says 12#34, SLX still returns 12,34)

Is there a different setting for the Oracle OLEDB provider? Where?


Any idea what else that could be related to?

Thanks for any advice...

Marty

[Reply][Quote]
Marty05
Posts: 68
 
Re: Numeric DB Value not recognized?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Mar 14 9:49 AM

long google & try&error later I found out, that recordset in Win7 returns some spaces at end of string.


a trim(rs.value(..)) solves the problem - even if it is not obvious:



?len(rs.Fields("open").Value) = 5


?len(trim(rs.Fields("open").Value)) = 5


?isNumeric(rs.Fields("open")) = False


?isNumeric(trim(rs.Fields("open"))) = True


 



but that's not how it should meant to be imho. Changing all scripts in all OLEDB apps is a no-go. So I strongly blame settings in Win7/Oracle to be bad.


So if anyone has experiences that and knows where to look for I would be very happy to get any hints. Thanks!

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2020 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 5/26/2020 12:55:05 PM