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

Nick Gorham nick at lurcher.org
Thu Nov 8 13:20:35 GMT 2012


On 08/11/12 12:24, Aniruddha Kulkarni wrote:
>
> Hi,
>
> 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?
>
> Thanks
>
> ~Aniruddha
>

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.

-- 
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-dev/attachments/20121108/e0742bcc/attachment.html>


More information about the unixODBC-dev mailing list