ASP SQL query problem

Results 1 to 2 of 2

Thread: ASP SQL query problem

  1. #1
    Jason Guest

    Default ASP SQL query problem

    YOUR RESPONSE:<BR><BR> <BR>ASP SQL query problem<BR> <BR>Jason - 17 Jul - 08:50:00 AM<BR>--------------------------------------------------------------------------------<BR>This is probably but quite simple but it is causing me a lot of trouble right now.<BR><BR>I have written the below :-<BR><BR>strSQL="select part, price from products where part=" & strPart<BR>set objRS=strConnection.Execute(strSQL)<BR><BR>but keep getting the below error message when the script is run :-<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>/bag.asp, line 19 <BR><BR><BR>I have successfully linked to a database before although I did come against this problem then as well. Then I overcame it by selecting * instead of just named fields. In this instance though even this does not work. The SQL is correct and the database field names are correct. Also I have written the strSQL to the screen and it does incorporate the variable strPart which is a querystring.<BR><BR>Thanks if you can help.<BR><BR><BR> <BR>

  2. #2
    prakash Guest

    Default Here you go...

    strSQL="select part, price from products " _<BR> & "where part=&#039;" & strPart & "&#039;"

Posting Permissions

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