Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Microsoft VBScript runtime error '800a000d'


Message #1 by srobinson@g... on Wed, 17 Oct 2001 13:17:55
Hi All,



I am getting the following error:-



Microsoft VBScript runtime error '800a000d' 



Type mismatch 



Can anyone help?



Basically all I am doing is pulling a number out of a database 'jn' and 

then if the number is less than 9999, I increment the number.  The error 

is occurring on the line that reads:-



if jn < 9999 then



etc.



Cheers,



Simon.
Message #2 by Steve Carter <Steve.Carter@t...> on Wed, 17 Oct 2001 13:24:24 +0100
what is the dim statement for jn?



What else do you do to jn before this line?



Message #3 by "Craig Flannigan" <ckf@k...> on Wed, 17 Oct 2001 13:25:04 +0100
Is jn a string, integer or something else?



Try this



If cInt(jn) < 9999 then



End if





Message #4 by "Simon Robinson" <srobinson@g...> on Wed, 17 Oct 2001 13:34:55 -0700
Hi Steve,



The Dim is outside the Sub where the increment is applied to jn.



The only other thinh that I do to jn is :- jn 

Recordset1.Fields.Item("Jobnumber1").Value



Cheers,



Simon.



Message #5 by "Dallas Martin" <dmartin@z...> on Wed, 17 Oct 2001 08:37:44 -0400
Before you "use" the number that you've just selected from the

database, are you checking to see if it is null or empty?



set rs = conn.execute("SELECT number FROM table")



vNumber = rs("number")

if vNumber <> "" then

   some code

else

 some code

end if



If you attempt to pass the vNumber to a VBScript function and it is empty or

null,

you get the error that you described.

  iNumber = CInt(vNumber)



Will produce an error if the vNumber is empty or null.



Dallas









----- Original Message -----

From: <srobinson@g...>

To: "ASP Databases" <asp_databases@p...>

Sent: Wednesday, October 17, 2001 1:17 PM

Subject: [asp_databases] Microsoft VBScript runtime error '800a000d'





> Hi All,

>

> I am getting the following error:-

>

> Microsoft VBScript runtime error '800a000d'

>

> Type mismatch

>

> Can anyone help?

>

> Basically all I am doing is pulling a number out of a database 'jn' and

> then if the number is less than 9999, I increment the number.  The error

> is occurring on the line that reads:-

>

> if jn < 9999 then

>

> etc.

>

> Cheers,

>

> Simon.
Message #6 by "Simon Robinson" <srobinson@g...> on Wed, 17 Oct 2001 13:38:18 -0700
Hi Craig,



 jn is a number.

 I have just tried your suggestion and I am still getting the same

error.



Simon.



Message #7 by "Craig Flannigan" <ckf@k...> on Wed, 17 Oct 2001 13:52:43 +0100
Is it null?



Check with the command IsNull(jn)



You cannot perform the addition if jn is empty/null





Message #8 by "Drew, Ron" <RDrew@B...> on Wed, 17 Oct 2001 08:55:17 -0400
How is jn defined and how do you get a value to it.  Show code



Message #9 by "Simon Robinson" <srobinson@g...> on Wed, 17 Oct 2001 13:59:04 -0700
Hi Dallas,



It is definitely not null because I am checking the value by

Response.Write(jn) just before I perform the if jn < 9999 then etc.



Cheers,



Simon. 



Message #10 by "Craig Flannigan" <ckf@k...> on Wed, 17 Oct 2001 14:20:40 +0100
Try using the cInt on the SELECT statement.



Select field, field, cInt(Field), Field  ...





Message #11 by Steve Carter <Steve.Carter@t...> on Wed, 17 Oct 2001 14:44:38 +0100
Yeah, I'm not so sure that you have the correct line there for the failure,

show us the whole routine if poss!



Cheers,



Steve




  Return to Index