Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CLng Type Mismatch

Status
Not open for further replies.

nphani

Technical User
Feb 10, 2002
104
US
I have a text box in my form. Earlier, this was an empty field and users have to enter a number in it and click submit. Upon submit, the value in this field is CLng'ed and checked with some other value. Everything was working fine.
Now, I have added a default value to that text field as:
<input type='text' name='quantity' value='1'>
Whenever I submit, there is an error as:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'CLng'

Why is this error? How should I represent the default value?
Phani
 
Your code should work if you have it like this (try this code out by itself):
Code:
<%
 Response.Write(&quot;|&quot; & CLng(Request(&quot;test&quot;)) & &quot;|&quot;)
%>
<html>
	<head>
	</head>
	<body>
		<form method=&quot;post&quot;>
			<input type=&quot;text&quot; name=&quot;test&quot; value=&quot;1&quot;>
			<input type=&quot;submit&quot;>
		</form>
	</body>
</html>

Take Care,
Mike
 
Thanx for the replies...
I could correct the error... it was due to database contents... somebody else had changed them... i am sorry to bother u all...
Phani
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top