Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 37794 invoked from network); 13 Jul 2010 09:03:07 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 13 Jul 2010 09:03:07 -0000 Received: (qmail 63792 invoked by uid 500); 13 Jul 2010 09:03:06 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 62737 invoked by uid 500); 13 Jul 2010 09:03:04 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 61606 invoked by uid 99); 13 Jul 2010 09:03:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Jul 2010 09:03:02 +0000 X-ASF-Spam-Status: No, hits=1.0 required=10.0 tests=FORGED_YAHOO_RCVD,FREEMAIL_FROM,SPF_HELO_PASS,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Jul 2010 09:02:56 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1OYbNr-0005Lw-8w for users@activemq.apache.org; Tue, 13 Jul 2010 02:02:35 -0700 Message-ID: <29148164.post@talk.nabble.com> Date: Tue, 13 Jul 2010 02:02:35 -0700 (PDT) From: r8rdarklord To: users@activemq.apache.org Subject: Function Sequence Error MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: shailendra_mishra@yahoo.com X-Virus-Checked: Checked by ClamAV on apache.org I have written a multithreaded ODBC program which tries to insert data to 11 tables in MonetDB. Each thread has a connection handle, a statment handle (comprising of insert into blah!....). Each thread on instantiation creates the handles (connection, statement etc.), connects to the db, binds meta-data, prepares query and executes the insert in a loop after reading the bind values from a file. The program runs fine to a point following which: SQLExecute: Error: SQLstate HY010, Errnr 0, Message [MonetDB][ODBC Driver 1.0]Function sequence error On closer examination it's the statement handle that is not in Prepared state. I thought that this maybe because the asynchronous execution of the previous execution of the commit isn't complete yet. I recoded my commit as follows: ret_sts = SQLEndTran(SQL_HANDLE_DBC, dbch, SQL_COMMIT); while (ret_sts == SQL_STILL_EXECUTING) ret_sts = SQLEndTran(SQL_HANDLE_DBC, dbch, SQL_COMMIT); check(ret_sts, SQL_HANDLE_DBC, dbch, "SQLEndTran"); However, the ret_sts returns -1 which means a SQL_ERROR This has me perplexed. Clearly the SQL is good else it wouldn't have executed a no. of times in the first place. The stmth also look good, so there is no stepping by threads on each others memory. I can post the whole program if needed. -- View this message in context: http://old.nabble.com/Function-Sequence-Error-tp29148164p29148164.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.