OLE DB Provider for ODBC Drivers error ' 80040e07'

Results 1 to 2 of 2

Thread: OLE DB Provider for ODBC Drivers error ' 80040e07'

  1. #1
    Join Date
    Dec 1969
    Posts
    10

    Default OLE DB Provider for ODBC Drivers error ' 80040e07'

    Hello potential mind saviours<BR><BR>I have created two ASP pages, one to display headings from a database and one to display futher details on each heading.<BR><BR>the details are accessed by links form the first page.<BR><BR>the two pages have the same database connection code<BR><BR>first page<BR>&#060;% <BR>Set oConn = Server.CreateObject("ADODB.Connection")<BR>oConn.O pen "MotorTest"<BR>strSQL="SELECT TopicID, Classification, TopicTitle FROM MotorDetails ORDER BY Classification, TopicTitle"<BR>Set oRs = oConn.Execute(strSQL, lngRecs, 1) &#039adCmdText<BR>&#037;&#062;<BR><BR>second page<BR>&#060;% <BR>Set oConn = Server.CreateObject("ADODB.Connection")<BR>oConn.O pen "MotorTest"<BR>strSQL="SELECT * FROM MotorDetails WHERE TopicID=" & Request.QueryString("topicid")<BR>Set oRs = oConn.Execute(strSQL, lngRecs, 1) &#039adCmdText (this is the offending line 13)<BR>&#037;&#062;<BR><BR>yet when I try to load up the second page I get this message<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80040e07&#039 <BR><BR>[Microsoft][ODBC Microsoft Access 97 Driver] Data type mismatch in criteria expression. <BR><BR>/motorasp/_show_details.asp, line 13 <BR><BR>any help or thoughts will put my head to rest<BR><BR>thanks in advance Nicholas

  2. #2
    Vincent Chan Guest

    Default RE: OLE DB Provider for ODBC Drivers error ' 80040e07'

    Assuming that Request.QueryString("topicid") is a number, then it would seem that you did not close your have a missing &"" in your strSQL. So I guess that the proper syntax would be :<BR><BR>strSQL="SELECT * FROM MotorDetails WHERE TopicID=" & Request.QueryString("topicid") & ""<BR><BR>Hope this helps!<BR><BR>-Vincent<BR><BR>

Posting Permissions

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