Re: SQLExecDirect with SQL_ERROR dumps core on suselinux-x8664

Nick Gorham <[email protected]>
Newsgroups gmane.comp.db.unixodbc.devel
Message-ID <[email protected]>
G, Hemanth Kumar wrote:
>
> Hi Nick,
>
>       I have compiled unixODBC for suselinux-x8664.
> My odbc application dumps core when an incorrect sql statement is used 
> in SQLExecDirect.
>
> SQLExecDirect(hstmt, (SQLCHAR *)"select abcd", SQL_NTS);
>

It looks like its trying to call SQLError in the driver, and I guess it 
failed to extract a entry point for SQLError so the attempt to call 
address 0.

The code tests to see if the driver exports SQLGetDiagField or 
SQLGetDiagRec, and if it doesn't assumes that it must be ok to call 
SQLError. IN this case, it seems as if none of the error functions are 
exported by the driver.

I will look at adding a check to prevent the seg fault, but I would 
check whats being exported and what SQLGetFunction is reporting.

-- 
Nick
_______________________________________________
unixODBC-dev mailing list
[email protected]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.