Prev: Overwriting "Please wait" after long process
Next: Querystrings different in straight HTML and delimited ASP
From: .Net Sports on 21 Dec 2009 17:31 I have an item that goes into sql database coming from a select pulldown list.: <br>ACCESS LEVEL:<br> <select name=level><option value= SELECTED>"& RSFORM("level")&"</option><option value=1>1</option><option value=2>2</ option></select> Level is an integer datatype in the dbase, and is either a numeral 1, 2 ,or 3 when trying to either update or insert into the dbase: RSEVENTS("level") = cint(request("level")) I get a vbscript Type mismatch: 'cint' on this line; get the same error no matter if i leave the function blank " request("level") ?? NS
From: Bob Barrows on 21 Dec 2009 17:33 ..Net Sports wrote: > I have an item that goes into sql database coming from a select > pulldown list.: > > <br>ACCESS LEVEL:<br> <select name=level><option value= SELECTED>"& > RSFORM("level")&"</option><option value=1>1</option><option > value=2>2</ option></select> > > Level is an integer datatype in the dbase, and is either a numeral 1, > 2 ,or 3 > > when trying to either update or insert into the dbase: > > RSEVENTS("level") = cint(request("level")) > > I get a vbscript Type mismatch: 'cint' on this line; get the same > error no matter if i leave the function blank " request("level") > > ?? > NS Show us the result of Response.Write request("level") -- HTH, Bob Barrows
From: Evertjan. on 21 Dec 2009 18:14 Bob Barrows wrote on 21 dec 2009 in microsoft.public.inetserver.asp.general: > .Net Sports wrote: >> I have an item that goes into sql database coming from a select >> pulldown list.: >> >> <br>ACCESS LEVEL:<br> <select name=level><option value= SELECTED>"& >> RSFORM("level")&"</option><option value=1>1</option><option >> value=2>2</ option></select> >> >> Level is an integer datatype in the dbase, and is either a numeral 1, >> 2 ,or 3 >> >> when trying to either update or insert into the dbase: >> >> RSEVENTS("level") = cint(request("level")) >> >> I get a vbscript Type mismatch: 'cint' on this line; get the same >> error no matter if i leave the function blank " request("level") What is "leaving the function blank? What is "blank", an empty string? Do you mean the argument of cint() ? Cint() errors out if the argument is not convertable to a number, so an empty string will give an error. >> ?? >> NS > Show us the result of > > Response.Write request("level") This will possibly not help you, Bob, as you cannot see the difference between "1" and +1. ==================== and never never use request("level") specify what type of request you want to read, like: request.cookies("level") request.form("level") request.querystring("level") Request.servervariables("..") or other. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
From: Bob Barrows on 21 Dec 2009 18:59 Evertjan. wrote: > Bob Barrows wrote on 21 dec 2009 in > microsoft.public.inetserver.asp.general: > >> .Net Sports wrote: >>> I have an item that goes into sql database coming from a select >>> pulldown list.: >>> >>> <br>ACCESS LEVEL:<br> <select name=level><option value= SELECTED>"& >>> RSFORM("level")&"</option><option value=1>1</option><option >>> value=2>2</ option></select> >> Show us the result of >> >> Response.Write request("level") > > This will possibly not help you, Bob, > as you cannot see the difference between > "1" and +1. > Are you sure? Did you look at his source? -- Microsoft MVP - ASP/ASP.NET - 2004-2007 Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM"
From: .Net Sports on 21 Dec 2009 19:15 On Dec 21, 3:14 pm, "Evertjan." <exjxw.hannivo...(a)interxnl.net> wrote: > Bob Barrows wrote on 21 dec 2009 in > microsoft.public.inetserver.asp.general: > > > > > .Net Sports wrote: > >> I have an item that goes into sql database coming from a select > >> pulldown list.: > > >> <br>ACCESS LEVEL:<br> <select name=level><option value= SELECTED>"& > >> RSFORM("level")&"</option><option value=1>1</option><option > >> value=2>2</ option></select> > > >> Level is an integer datatype in the dbase, and is either a numeral 1, > >> 2 ,or 3 > > >> when trying to either update or insert into the dbase: > > >> RSEVENTS("level") = cint(request("level")) > > >> I get a vbscript Type mismatch: 'cint' on this line; get the same > >> error no matter if i leave the function blank " request("level") > > What is "leaving the function blank? > What is "blank", an empty string? > > Do you mean the argument of cint() ? > > Cint() errors out if the argument is not convertable to a number, > so an empty string will give an error. > > >> ?? > >> NS > > Show us the result of > > > Response.Write request("level") > > This will possibly not help you, Bob, > as you cannot see the difference between > "1" and +1. > > ==================== > > and never never use request("level") > > specify what type of request you want to read, like: > > request.cookies("level") > > request.form("level") > > request.querystring("level") > > Request.servervariables("..") > > or other. > > -- > Evertjan. > The Netherlands. > (Please change the x'es to dots in my emailaddress) If i don't need to change the Level when editing the record, then i want to leave what their existing level number is in the first line of the select option box: <select name=level><option value= SELECTED>"& RSFORM("level")&"</option><option value=1>1</option><option value=2>2</ option></select> I tried response.writing the request("level") on the next page, and it is blank , so something is not coming across in the post right: <form action="resources-edit-post.asp?qencl=admin" name="frmUser" Method="Post"> ''' content </form>
|
Next
|
Last
Pages: 1 2 Prev: Overwriting "Please wait" after long process Next: Querystrings different in straight HTML and delimited ASP |