[unixODBC-dev] I am getting "Function Sequence Error" When I try to do SQLDescribeParam() using my native ODBC

Aniruddha Kulkarni aniruddha_kulkarni at persistent.co.in
Thu Nov 8 13:33:50 GMT 2012

Thank a lot Nick for the reply. I will start DM tracing and see which call failed before SQLDescribeParam.


From: unixodbc-dev-bounces at mailman.unixodbc.org [mailto:unixodbc-dev-bounces at mailman.unixodbc.org] On Behalf Of Nick Gorham
Sent: Thursday, November 08, 2012 6:51 PM
To: Development issues and topics for unixODBC
Subject: Re: [unixODBC-dev] I am getting "Function Sequence Error" When I try to do SQLDescribeParam() using my native ODBC

On 08/11/12 12:24, Aniruddha Kulkarni wrote:

I am stuck with some issue here. I am trying to do certain operations on back-end using my native ODBC driver however when I call SQLDescribeParam() through my application it gives me an error as - SQLDescribeParam -> Rc = SQL_ERROR, Msg = [unixODBC][Driver Manager]Function sequence error

Here is the scenario which encountered this problem:

1>   Connect to backend using SQLConnect()

2>   Prepare an insert query having geometry as col type using SQLPrepare()

3>   Set the statement attributes using SQLSetStmtAttr()

4>   Bind the parameters with the data type using SQLBindParameter()

5>   Then execute the parameterized query using - SQLExecute()

6>   Call SQLNumParams() on statement

7>   Then in a loop, call SQLDescribeParam() with the appropriate function arguments.

With this sequence of functions I am getting the mentioned error. My doubt is on unixODBC driver manager I have been using, because if I try to run the application without DM then it works as expected. So I believe there is some error that is caught by driver manager and error is thrown.

Can anybody please shed some light on the probable cause of the error?


You don't say which version of the DM you are using, but I would turn DM tracing on and see if one of the calls before the SQLDescribeParam failed.


This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-dev/attachments/20121108/96f10779/attachment.html>

More information about the unixODBC-dev mailing list