Too few parameters. Expected 2

Results 1 to 2 of 2

Thread: Too few parameters. Expected 2

  1. #1
    Alberto Ferrari Guest

    Default Too few parameters. Expected 2

    Hi:<BR>I have an ASP with a query to MsAccess 97, I&#039ve got this error: <BR><BR>"[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2." (or 1) <BR><BR>This is the ASP code: <BR><BR>&#060;% <BR>Set Conn = Server.CreateObject("ADODB.Connection") <BR>PRU = "DRIVER={Microsoft Access Driver (*.mdb)}; <BR>DBQ=E:WEBguichondatabasesPRU.mdb;" <BR>Conn.Open PRU <BR><BR>SQL = "SELECT * FROM (Propiedades P LEFT JOIN CallesBa C ON P.[IdCalle] = C.[IdCalle]) LEFT JOIN Tipos T ON P.[IdTipo] = T.[IdTipo]"<BR><BR>Set RS = Conn.Execute(SQL) <BR>%&#062; <BR><BR>This Select dont requires parameters!! What is wrong??<BR>I&#039ve made the same qery INSIDE Access and works OK !!<BR><BR>If I try the following code in ASP (only one JOIN) it works fine, both in ASP and Access : <BR><BR>SELECT * FROM Propiedades P LEFT JOIN CallesBa C ON P.[IdCalle] = C.[IdCalle]<BR><BR>The problem seems to be when joinning more than 2 tables?? I&#039ve read other users messages with the same problem, but it seems that nobody gets the right solution.<BR><BR>Thanks! <BR><BR> <BR>

  2. #2
    Join Date
    Dec 1969

    Default Try using an *implicit* join???

    This *might* work:<BR><BR>SQL = "SELECT * FROM Propiedades AS P, CallesBa AS C, Tipos AS T " _<BR>&nbsp; &nbsp; &nbsp; & "WHERE C.[IdCalle] = P.[IdCalle] AND P.[IdTipo] = T.[IdTipo]"<BR><BR>It&#039s really 100% the same query. I learned to do SQL without the JOIN keyword and it usually works fine for me.<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