Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Discussions (Oracle)
 Who's still working on this?
 Forum Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

pweighill
Junior Member

United Kingdom
453 Posts

Posted - 25 November 2002 :  18:39:30  Show Profile
quote:
Originally posted by Rahanini

- a big problem i am dealing with is that the data is coming back from my database as strings all the time. As a result whenever the forum code tries to make a comparison (ie. if a=b then...) i get a datatype mismatch error. SO the way i fixed this was by manually converting all the data to numbers using the vbscript function CLng. so that worked.



Actually, all number fields from Oracle are being returned as Decimal variables in VBScript (You can check this using the VarType function).

The odd thing is that when you compare two Decimal variables in VBScript it returns back a Type Mismatch Error. So you either need to convert both variables to Integers or Stiings when you need to compare them.

This seems to be a problem with VBScript and will require a lot of CLng adding in a lot of places throughout the ASP code.<
Go to Top of Page

pweighill
Junior Member

United Kingdom
453 Posts

Posted - 26 November 2002 :  05:33:59  Show Profile
Here are a few Microsoft KB articles on the subject:

Oracle Numeric Fields Must Be Converted for Logical Tests
http://support.microsoft.com/default.aspx?scid=kb;en-us;178043

VBScript "Type Mismatch" Error When Field Type Is adNumeric
http://support.microsoft.com/default.aspx?scid=kb;en-us;195180

VBScript "Type Mismatch" Error When Field Type Is adNumeric
http://support.microsoft.com/default.aspx?scid=kb;en-us;306916<
Go to Top of Page

cushman
Starting Member

USA
6 Posts

Posted - 11 December 2002 :  16:38:14  Show Profile
I have been reading these messages. I can not tell if there is a "finished" version using Oracle or not. Can anyone summarize the status? Can we 'divide up' what is left to do?<
Go to Top of Page

Rahanini
Starting Member

35 Posts

Posted - 28 December 2002 :  18:37:26  Show Profile  Send Rahanini an AOL message
pweighill that was the problem i was having. I keep using cInt everytime i encounter a type mismatch error which is pretty often...i've changed alot of them, but im sure more will pop up as the forum is used.<
Go to Top of Page

pweighill
Junior Member

United Kingdom
453 Posts

Posted - 29 December 2002 :  05:42:47  Show Profile
I think it would be better to use cLng rather than cInt since cInt will only work for numbers up to 32768.

I got a bit sick of going through all the asp code and adding cLng to the code so I gave up at that point. (I didn't NEED an oracle version, I was just trying to see if it could be done)<
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 Forum Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000 Version 3.4.07