ASP IsNumeric() = False?

U

Uncle Ben

I wrote a stored procedure to INSERT a new row in the database. It returns
the new ID via @@IDENTITY.

This value is read by my ASP and stored in variable intNewID. The value
displays fine via <%= intNewID %>. But when I tested it using
IsNumeric(intNewID), it returned False.

Why is that?
 
D

Dave Anderson

Uncle said:
I wrote a stored procedure to INSERT a new row in the database. It
returns the new ID via @@IDENTITY.

This value is read by my ASP and stored in variable intNewID. The
value displays fine via <%= intNewID %>. But when I tested it using
IsNumeric(intNewID), it returned False.

Just for the record, IsNumeric is not part of ASP.

Since you didn't post your code, I'll guess that you're reading a recordset,
and assigning the variable something like this:

intNewID = objRS("ID")

Do you note any difference if you change it to this?

intNewID = objRS.Fields("ID").Value


--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 
E

Evertjan.

Dave Anderson wrote on 03 mrt 2005 in
microsoft.public.inetserver.asp.general:
Just for the record, IsNumeric is not part of ASP.

You are right, it is part of asp-vbscript.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top