Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2009
    Posts
    12

    Unanswered: Oledb Db_e_errorsincommand

    I'm trying to execute the following query via ICommandText->Execute:

    SELECT A.ID
    FROM A
    LEFT OUTER
    JOIN B
    ON B.ID = A.ID
    LEFT OUTER
    JOIN C
    ON C.ID = A.ID + B.CSEQS
    GROUP
    BY A.ID
    , A.SubTotal
    HAVING (A.SubTotal - COALESCE(SUM(C.TranAmount),0) > 100 AND A.SubTotal - COALESCE(SUM(C.TranAmount),0) < 200)

    I'm getting an incorrect syntax error yet this command runs fine in mgmt studio.

    Any suggestions?

  2. #2
    Join Date
    Jul 2009
    Posts
    12

    oledb db_e_errorsincommand

    Doh!!!

    I was executing this via a stored procedure passing in the query as a parameter. I didn't have a big enough buffer...sigh.

Posting Permissions

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