SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Jun 2004
    Location
    Turkey - Ankara
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    (0x800A000D) type mismatch.

    (0x800A000D) type mismatch.

    --------------------------------------------------------------------------------

    I got the error
    (0x800A000D) type mismatch.

    My codes are like that.


    <b>Evrak Türü </b><select name="EVRTUR" etiket="Evrak Türü" gerekli nofocus>

    the page cannot found because of the red line

    <option selected value="<%=Cint(rs("EVRTURKOD"))%>"><%=rs("EVRTURAD")%></option>


    <%
    set rs=Server.CreateObject("ADODB.Recordset")
    ssql = "select * from EVRTURLER"
    rs.Open ssql, DBConn, 3, 3
    Do while not rs.Eof %>
    <option value="<%=Cint(rs("EVRTURKOD"))%>"><%=rs("EVRTURAD")%></option>

    <% rs.MoveNext
    loop
    set rs = Nothing %>
    </select>

    Please help
    I couldn't find the reason and solution

    --------------------------------------------------------------------------------

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The parameter you are passing to CInt is outside of the acceptable range for the Integer subtype, so you get an error.

    Assuming that the field in question is an INT field in your database, it's probably hitting a record which is NULL

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2006
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    most probably you have a NULL value in a field
    try this
    Code:
    <option value="<&#37;=cstr(rs("EVRTURKOD"))%>"><%=rs("EVRTURAD")%></option>
    if that workss that means you have a NULL value

  4. #4
    SitePoint Member
    Join Date
    Jun 2004
    Location
    Turkey - Ankara
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jimfraser View Post
    The parameter you are passing to CInt is outside of the acceptable range for the Integer subtype, so you get an error.

    Assuming that the field in question is an INT field in your database, it's probably hitting a record which is NULL
    cstr didn't cause eny change
    The same error contunies...

  5. #5
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try changing this
    Code:
    <option value="<&#37;=Cint(rs("EVRTURKOD"))%>"><%=rs("EVRTURAD")%></option>
    to this
    Code:
    <%
    If Not IsNull(rs.Fields("EVRTURKOD").Value) Then
    	If IsNumeric(rs.Fields("EVRTURKOD").Value) Then
    		%><option value="<%=CInt(rs("EVRTURKOD"))%>"><%=rs("EVRTURAD")%></option><%
    	Else
    		%><option value="<%=CStr(rs("EVRTURKOD"))%>"><%=rs("EVRTURAD")%></option><%
    	End If
    Else
    	%>field was null<%
    End If
    %>
    and see how it goes

  6. #6
    SitePoint Member
    Join Date
    Jun 2004
    Location
    Turkey - Ankara
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you very much jimfraser.
    I am not getting an error type mismatch now.
    Programme is going on
    But the value displayin on the screen doesn't the same value in the database.

    How can I tackle this problem.

  7. #7
    SitePoint Member
    Join Date
    Jun 2004
    Location
    Turkey - Ankara
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile

    Quote Originally Posted by dozdemir View Post
    Thank you very much jimfraser.
    I am not getting an error type mismatch now.
    Programme is going on
    But the value displayin on the screen doesn't the same value in the database.

    How can I tackle this problem.

    I solve the problem.
    The problem was on the connection string.
    I missed the below code;

    ssql =ssql& " where EVRAK_NO ="& request.QueryString("EVRAK_NO")&"and DEFTERYILI=" & goster_yil

    After adding this line the value that comes from database matches the value on the browser.

    Thanks for help to everybody


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •