Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2004
    Posts
    1

    Unhappy Unanswered: SQL statement - Invalid cursor state

    i am connecting to a MS Access DB, i am able to execute all the other select statments, except this one (presumably due to the SUM(Amount) as Total.


    SELECT invoice_type, SUM(Amount) as Total FROM invoice WHERE invoice_date >= #1 April 2004# AND invoice_date < #1 April 2005# AND Student_ID = 31 GROUP BY invoice_type


    I get an "Invalid Cursor State".

    The query works if i create a new one in Access itself, but i need the variables to be different each time.

    Any ideas?

    Thanks

    P

  2. #2
    Join Date
    Dec 2003
    Posts
    454
    Did you try to execute the query statement without SUM() function?

    SELECT invoice_type FROM invoice WHERE invoice_date >= #1 April 2004# AND invoice_date < #1 April 2005# AND Student_ID = 31 GROUP BY invoice_type

Posting Permissions

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