Just want to pull Data

Results 1 to 3 of 3

Thread: Just want to pull Data

  1. #1
    JankyCode Guest

    Default Just want to pull Data

    Oh Man please help...Kinda new at ASP and I have been reading every book I can get my hands on. I am trying to pull data from my Access database. I have created a form with three fields that the enduser inputs information. (lastname, firstname, and salescode.) On my response asp page my if statements look like the following: <BR><BR>sql = "SELECT * FROM tblbir WHERE (lastname = &#039;" & request("lastname") & "&#039;)"<BR>if request("firstname") &#060;&#062; "" then<BR> sql = "select * from tblclr WHERE (firstname = &#039;" & request("firstname") & "&#039;)"<BR>end if<BR>if request("salecode") &#060;&#062; "" then<BR> sql="select * from tblclr WHERE (salescode LIKE &#039;%" & request("salescode") & "%&#039;) "<BR>end if<BR><BR>I know my code is bombing out in my "If" statment because I received the following message: <BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039;80040e10&#039; <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. <BR><BR>Please help.<BR><BR>Thanks,<BR>

  2. #2
    Join Date
    Dec 1969

    Default Did you copy/paste...

    ...that code or type it in again? I see at least two typos in it, so if you didn&#039;t copy/paste, would you please go back and try again...this time doing copy/paste?<BR><BR>And don&#039;t you want the thing to search all three fields if all three are input? As it is now, if salescode is input, first and last name will be ignored.<BR><BR>FInally, copy/paste the *EXACT* error message, full text, *AND* indicated the line it bombs on in your listing.<BR><BR>

  3. #3
    JankyCode Guest

    Default RE: Did you copy/paste...

    Thank you for your help....I will go back and check. Thank you.

Posting Permissions

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