p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

proasp_codeclinic thread: Type mismatch


Message #1 by "Kai" <csmh@g...> on Mon, 2 Jul 2001 21:23:08
The integer type is not a valid format for a HTML Form field, nearly all
are sent as plain alphanumeric text from the form to the server, so you
need to convert it using CInt.

At 14:04 02/07/01 -0700, you wrote:

>an input type "integer" is not valid..is it?
>
>try:
>
>noDemo =3D request.fomr("noDemo")
>if isNumeric(noDemo) then
>         noDemo =3D cint(noDemo)
>else
>         noDemo =3D 0  'default value in case of bad data
>end if
>
>rsCli("CliDemoNumber") =3D noDemo
>
>
>also consider using SQL to do inserts/updates
>
>
>
>
>At 09:23 PM 7/2/2001 +0000, you wrote:
>>Hi, I got a problem to read a integer number from web browser to Database.
>>I declared my interger variable as following:
>>  <input type=3D"integer" name=3D"nodemo" value"<%=3D
 session("CliDemoNumber")%>"
>>size=3D"1">
>>But seems it's not working well, because I got error message "Type
>>mismatch" on following code:
>>         rsCli("CliDemoNumber")=3Dint(request.form("Nodemo"))
>>If someone could give me a hand, I really appreciate!
>>
>>Kai
>
>
>Robert Chartier
>Author, AspFree.com
>604-975-5590
>rob@a...
>http://www.aspfree.com/devlinks
>http://www.aspfree.com/authors/robert
>http://www.aspalliance.com/nothingmn
>
>

  Return to Index