Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)

    Error Type:
    Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)
    [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria
    expression.
    /index.asp, line 35

    i have following many forums on how to solve this issue. but it still dont work
    i suppose t he solution is remove extra ("")
    but i dont see any place to remove it, cause i am not a programmer that why
    using macromedia to assist me to do my school project. and i am in the rush for
    submittion, and is all stuck now.

    please help me by reviewing below build in code.

    <%@LANGUAGE="VBSCRIPT"%>
    <!--#include file="Connections/conlogindb.asp" -->
    <%
    Dim Recordset
    Dim Recordset_numRows

    Set Recordset = Server.CreateObject("ADODB.Recordset")
    Recordset.ActiveConnection = MM_conlogindb_STRING
    Recordset.Source = "SELECT * FROM login_table"
    Recordset.CursorType = 0
    Recordset.CursorLocation = 2
    Recordset.LockType = 1
    Recordset.Open()

    Recordset_numRows = 0
    %>
    <%
    ' *** Validate request to log in to this site.
    MM_LoginAction = Request.ServerVariables("URL")
    If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" +
    Server.HTMLEncode(Request.QueryString)
    MM_valUsername=CStr(Request.Form("username"))
    If MM_valUsername <> "" Then
    MM_fldUserAuthorization=""
    MM_redirectLoginSuccess="register.asp"
    MM_redirectLoginFailed="login_error.asp"
    MM_flag="ADODB.Recordset"
    set MM_rsUser = Server.CreateObject(MM_flag)
    MM_rsUser.ActiveConnection = MM_conlogindb_STRING
    MM_rsUser.Source = "SELECT username, password"
    If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source &
    "," & MM_fldUserAuthorization
    MM_rsUser.Source = MM_rsUser.Source & " FROM login_table WHERE username='" &
    Replace(MM_valUsername,"'","''") &"' AND password='" &
    Replace(Request.Form("password"),"'","''") & "'"
    MM_rsUser.CursorType = 0
    MM_rsUser.CursorLocation = 2
    MM_rsUser.LockType = 3
    MM_rsUser.Open
    If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
    ' username and password match - this is a valid user
    Session("MM_Username") = MM_valUsername
    If (MM_fldUserAuthorization <> "") Then
    Session("MM_UserAuthorization") =
    CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization ).Value)
    Else
    Session("MM_UserAuthorization") = ""
    End If
    if CStr(Request.QueryString("accessdenied")) <> "" And false Then
    MM_redirectLoginSuccess = Request.QueryString("accessdenied")
    End If
    MM_rsUser.Close
    Response.Redirect(MM_redirectLoginSuccess)
    End If
    MM_rsUser.Close
    Response.Redirect(MM_redirectLoginFailed)
    End If
    %>

    keithhiap Guest

  2. Similar Questions and Discussions

    1. Microsoft OLE DB Provider for ODBC Drivers error'80040e14'
      I keep getting this error on the update asp page. I am very new at this and would appreciate any help. Thank you. Microsoft OLE DB Provider for...
    2. Microsoft OLE DB Provider for ODBC Drivers error '80004005'
      Hello, I have Web application running on 2003. It uses MSSql-2000 database. Database server is located on different machine. From ASP, it...
    3. Help!! Microsoft OLE DB Provider for ODBC Drivers error '80040e37'
      Hello All, I've recently migrated servers (NT 4.0 sp6) to Win2k3 Standard, and I now have this error message on a webpage. The problem only...
    4. Microsoft OLE DB Provider for ODBC Drivers error '80040e31'
      Hi, I get this error: Microsoft OLE DB Provider for ODBC Drivers error '80040e31' Timeout expired I use SQL7 and IIS 4 on NT 4. Where can I...
    5. Microsoft OLE DB Provider for ODBC Drivers error '80004005' Error
      Hi folks - i've got a windows 2000 server (SP3) i've run the IIS lockdown tool on it and set for dynamic websites - all the static pages within the...
  3. #2

    Default Re: Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)

    What are the data types for each of the fields in login_table, and what kind
    of database is it? Sounds like one of the fields in the table may be set to
    an incompatible type.

    Best regards,
    Chris


    Chris In Madison Guest

  4. #3

    Default Re: Microsoft OLE DB Provider for ODBC Drivers(0x80040E07)

    my datatype is

    username - text
    password - number

    everything remain default in Microsoft Access

    please help me, my project submission is round the corner, and i have to
    complie documentation and presentation.

    i am trying out using frontpage, since Macromedia unable to provide a solution.

    i have done one similar project before, and has no problem.

    i suspected is WinXP SP2, but i formated my computer and try out with patches,
    and it still dont work.

    is the problem lies on Macromedia Dreamweaver MX 7.2 ?

    keithhiap Guest

  5. #4

    Default Re: Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)

    No, the problem is with your data types. The error is from the OLE DB
    provider. MM's log in user behavior expects both your user name and
    password to be text, and treats them as such. This normally isn't a
    problem, as a number submitted as text is converted to a number by the
    database without you having to do anything. A problem WILL arise if you
    submit non-numeric text in your password field. The conversion to a number
    will fail.

    "keithhiap" <webforumsuser@macromedia.com> wrote in message
    news:d0n3m4$ipn$1@forums.macromedia.com...
    > my datatype is
    >
    > username - text
    > password - number
    >
    > everything remain default in Microsoft Access
    >
    > please help me, my project submission is round the corner, and i have to
    > complie documentation and presentation.
    >
    > i am trying out using frontpage, since Macromedia unable to provide a
    solution.
    >
    > i have done one similar project before, and has no problem.
    >
    > i suspected is WinXP SP2, but i formated my computer and try out with
    patches,
    > and it still dont work.
    >
    > is the problem lies on Macromedia Dreamweaver MX 7.2 ?
    >

    CMBergin Guest

  6. #5

    Default Re: Microsoft OLE DB Provider for ODBC Drivers(0x80040E07)

    i converted

    username - text - format
    password - text - format

    and it works

    thanks.

    however, what i know is when doing declaration, number format is mend for
    password, and i never come across password has to set to text format.

    ah, i dont give a damn now, i got to rush my project with this solution


    keithhiap Guest

  7. #6

    Default Re: Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)

    That was going to be my suggestion. Glad you got it working :-)

    Best regards,
    Chris


    Chris In Madison Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139