Ask a Question related to ASP Database, Design and Development.
-
Miguel Orrego #1
Type Mismatch again
Hi,
One page passes a strIssueNo to another, so on the 2nd page:
Dim IssueNo
IssueNo = Request.Item("strIssueNo")
This 2nd page is designed to create a new record in a database table,
however I get a Type Mismatch error. This is the line that adds the issue
number:
rsAddNote.Fields("IssueNo") = IssueNo
The field IssueNo is a numerical field in the table, and strIssueNo that is
being passed from the previous page is definitely a number.
What is wrong with my syntax and how can I correct this error?
Thanks in advance.
Miguel Orrego Guest
-
Type mismatch error
This query works fine on a live server using an MSSQL database: <cfquery name="qIndex" datasource="#appDSN#" username="shampoo"... -
Interface Type Mismatch
This works in Java, so it is not clear why Actionscript does not implement it the same way. If an instance of a class that implements an Interface... -
Type mismatch?
Hi i'm getting a type mismatch error, anyone tell me why pls? conn.Execute "DELETE FROM Bmemo WHERE (tDate <= '" & date() & "')" tDate is a... -
Type Mismatch
I'm at my wits end here. I am getting type mismatch error in a ASP page when I try to multiply decimals*integers. This shouldn't be this difficult.... -
Type mismatch in expression
Dear anyone, I used the wizard to make a form, but when I try to go from design view to form view an eooro message comes up "Type mismatch in... -
Matt Smith #2
Re: Type Mismatch again
If you're sure that the data is going to be valid then you can just force
the type with CInt()
If you're not so sure, then try applying IsNumeric() first.
e.g:
dim IssueNo
IssueNo= Request.Item("strIssueNo")
If IsNumeric(IssueNo) then
rsAddNote.Fields("IssueNo") = CInt(IssueNo)
End If
Hope it helps.
Matt
Matt Smith Guest
-
Tim Williams #3
Re: Type Mismatch again
isn't the limit for int around 32000? Seems you'd be hard-pressed to fit
906k into that datatype.
Possible your db field is something else ?
tim
"Miguel Orrego" <miguel@stressedmonkey.net-nospam> wrote in message
news:3f05a610$0$10627$cc9e4d1f@news.dial.pipex.com ...that> Thanks Matt, unfortunately this still doesn't seem to solve the problem.
>
> I am certain that strIssueNumber is a number, because this is the link[url]http://webserver/systems/helpdesk/globm/createnote.asp?strIssueNo=0000000000[/url]> the previous page generates to get to this one:
>
>is> 0000906741
>
> When I try to use
>
> rsAddNote.Fields("IssueNo") = CInt(IssueNo)
>
> I now get a different error:
>
> Microsoft VBScript runtime error '800a0006'
>
> Overflow: 'CInt'
>
> /systems/helpdesk/globm/createnote.asp, line 39
>
>
>
> The field IssueNo in the database table is an integer field. The databaseforce> sql server 7.0
>
> Any ideas?
>
> Thanks.
>
>
>
> "Matt Smith" <_matt@breathemail.net> wrote in message
> news:be43nq$re4$1@hercules.btinternet.com...> > If you're sure that the data is going to be valid then you can just>> > the type with CInt()
> > If you're not so sure, then try applying IsNumeric() first.
> > e.g:
> > dim IssueNo
> > IssueNo= Request.Item("strIssueNo")
> > If IsNumeric(IssueNo) then
> > rsAddNote.Fields("IssueNo") = CInt(IssueNo)
> > End If
> >
> > Hope it helps.
> >
> > Matt
> >
> >
>
Tim Williams Guest
-
Marvin Thompson #4
Re: Type Mismatch again
To avoid the overflow, use CLng(strIssueNo)
"Tim Williams" <saxifrax@pacbell*dot*net> wrote in message
news:%23dnyInmQDHA.1564@TK2MSFTNGP12.phx.gbl...[url]http://webserver/systems/helpdesk/globm/createnote.asp?strIssueNo=0000000000[/url]> isn't the limit for int around 32000? Seems you'd be hard-pressed to fit
> 906k into that datatype.
>
> Possible your db field is something else ?
>
> tim
>
>
>
> "Miguel Orrego" <miguel@stressedmonkey.net-nospam> wrote in message
> news:3f05a610$0$10627$cc9e4d1f@news.dial.pipex.com ...> that> > Thanks Matt, unfortunately this still doesn't seem to solve the problem.
> >
> > I am certain that strIssueNumber is a number, because this is the link>> > the previous page generates to get to this one:
> >
> >database> > 0000906741
> >
> > When I try to use
> >
> > rsAddNote.Fields("IssueNo") = CInt(IssueNo)
> >
> > I now get a different error:
> >
> > Microsoft VBScript runtime error '800a0006'
> >
> > Overflow: 'CInt'
> >
> > /systems/helpdesk/globm/createnote.asp, line 39
> >
> >
> >
> > The field IssueNo in the database table is an integer field. The> is> force> > sql server 7.0
> >
> > Any ideas?
> >
> > Thanks.
> >
> >
> >
> > "Matt Smith" <_matt@breathemail.net> wrote in message
> > news:be43nq$re4$1@hercules.btinternet.com...> > > If you're sure that the data is going to be valid then you can just>> >> > > the type with CInt()
> > > If you're not so sure, then try applying IsNumeric() first.
> > > e.g:
> > > dim IssueNo
> > > IssueNo= Request.Item("strIssueNo")
> > > If IsNumeric(IssueNo) then
> > > rsAddNote.Fields("IssueNo") = CInt(IssueNo)
> > > End If
> > >
> > > Hope it helps.
> > >
> > > Matt
> > >
> > >
> >
>
Marvin Thompson Guest



Reply With Quote

