Error Too few parameteres expect 1

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • wildt

    Error Too few parameteres expect 1

    Works fine.

    Recid = rs("id")
    SQLstmt = "SELECT * FROM courses WHERE ID=" &
    Request.QuerySt ring("Recid")

    When i combine two tables

    SQLstmt = "SELECT tblAuthor.emplo yee_code, tblAuthor.name,
    Courses.status, Courses.ID, Courses.mdate, Courses.Instruc torID, FROM
    tblAuthor INNER JOIN Courses ON tblAuthor.emplo yee_code =
    Courses.Instruc torID WHERE Course.ID=" & Request.QuerySt ring("Recid")

    i get Too few parameteres expect 1
    is it a syntax error?
  • Aaron Bertrand - MVP

    #2
    Re: Error Too few parameteres expect 1

    > i get Too few parameteres expect 1[color=blue]
    > is it a syntax error?[/color]

    Tough to tell. SHow us what

    response.write SQLstmt

    yields...


    Comment

    • Ray at

      #3
      Re: Error Too few parameteres expect 1

      Do you have a querystring value for the "recid" key?

      Ray at work


      "wildt" <wildtfree48@ya hoo.com> wrote in message
      news:f69f166d.0 307210954.4e055 ff9@posting.goo gle.com...[color=blue]
      > Works fine.
      >
      > Recid = rs("id")
      > SQLstmt = "SELECT * FROM courses WHERE ID=" &
      > Request.QuerySt ring("Recid")
      >
      > When i combine two tables
      >
      > SQLstmt = "SELECT tblAuthor.emplo yee_code, tblAuthor.name,
      > Courses.status, Courses.ID, Courses.mdate, Courses.Instruc torID, FROM
      > tblAuthor INNER JOIN Courses ON tblAuthor.emplo yee_code =
      > Courses.Instruc torID WHERE Course.ID=" & Request.QuerySt ring("Recid")
      >
      > i get Too few parameteres expect 1
      > is it a syntax error?[/color]


      Comment

      • jbongran

        #4
        Re: Error Too few parameteres expect 1


        "wildt" <wildtfree48@ya hoo.com> a écrit dans le message de
        news:f69f166d.0 307210954.4e055 ff9@posting.goo gle.com...[color=blue]
        > Works fine.
        >
        > Recid = rs("id")
        > SQLstmt = "SELECT * FROM courses WHERE ID=" &
        > Request.QuerySt ring("Recid")
        >
        > When i combine two tables
        >
        > SQLstmt = "SELECT tblAuthor.emplo yee_code, tblAuthor.name,
        > Courses.status, Courses.ID, Courses.mdate, Courses.Instruc torID, FROM
        > tblAuthor INNER JOIN Courses ON tblAuthor.emplo yee_code =
        > Courses.Instruc torID WHERE Course.ID=" & Request.QuerySt ring("Recid")
        >
        > i get Too few parameteres expect 1
        > is it a syntax error?[/color]

        Is it a typo ?
        WHERE Course.ID where it should be WHERE Courses.ID
        Are you sure Recid is always populated ?
        Do a
        Response.Write "<b>SQLstmt :</b>" & SQLstmt & "<br>" & vbCrLf
        Response.Flush


        Comment

        Working...