Search Error

Results 1 to 3 of 3

Thread: Search Error

  1. #1
    Sean Guest

    Default Search Error

    This is part of my code from my search page that searches a Access database with the results of 2 dropdown lists named Make & Model.<BR><BR>I receive a error message: <BR>Microsoft OLE DB Provider for ODBC Drivers error &#039;80040e10&#039; <BR>[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2.<BR><BR>I&#039;ve double checked the culumn names with the query string and I&#039;m at a loss, Can Anyone see my problem or have a better way to display a list of vehicle models:<BR><BR>&#060;%<BR>Dim Connect, NewCars, WhereClause<BR>Dim Make, Model, NoResults<BR><BR>Set Connect = Server.CreateObject("ADODB.Connection")<BR>Connect .Open "MYDB"<BR><BR>Make = Trim(Request("Make"))<BR>Model = Trim(Request("Model"))<BR><BR>WhereClause = "Where "<BR>If Make &#060;&#062; "" Then<BR>WhereClause = WhereClause & "InStr(Make,&#039;" & _<BR>Make & "&#039;)&#062;0 AND "<BR>End If<BR>If Model &#060;&#062; "" Then<BR>WhereClause = WhereClause & "InStr(Model,&#039;" & _<BR>Model & "&#039;)&#062;0 AND "<BR>End If<BR>If Right(WhereClause,4) = "AND " Then<BR>WhereClause = Left(WhereClause, Len(WhereClause) -4)<BR>Query = "SELECT ModelID, ModelName, MakeName FROM Models " & WhereClause<BR>Set NewCars = Connect.Execute(Query) %&#062;<BR><BR>Thanks...

  2. #2
    Eddie Campbell Guest

    Default RE: Search Error

    What do you get when you do a response.write Query ? Please post the output

  3. #3
    Sean Guest

    Default RE: Search Error

    Can you please explain how to do this? as I&#039;m new to ASP<BR><BR>When I put the Response.Write Query in any part of the code I still get the same error message<BR><BR>I&#039;ve also tried - On Error Resume Next<BR>It just times out

Posting Permissions

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