By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,007 Members | 1,237 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,007 IT Pros & Developers. It's quick & easy.

Problem with SQLFreeStmt

P: n/a
Hi,

I have some C++ code which does the following

retcode = SQLFreeStmt(hStmt,SQL_UNBIND);
retcode = SQLFreeStmt(hStmt,SQL_RESET_PARAMS);
retcode = SQLFreeStmt(hStmt,SQL_CLOSE);

But sometimes it cores in the third statement.
I tried using "SQLCloseCursor (hStmt)" in its place but it also core dumped
sometimes.

Following is the stack
signal SEGV (no mapping at the fault address) in
Or8Statement::setToAllocatedSte at 0xfd1be710
0xfd1be710: setToAllocatedState+0x0368: ld [%o0 + 0xc], %g2

SQLCloseCursor(0x3114d68, 0xffffffff, 0x2fb58d8, 0x4e3f24, 0x45c0b4, 0x2)
BaseStatement::SQLCloseCursor(0x303c8b0, 0xffffffff, 0x0, 0xc, 0x5c,
0xff1f1d14)
BaseStatement::resetToAllocated(0x303c8b0, 0x0, 0x0, 0x8, 0x8, 0x8)
Or8Statement::setToAllocatedState(0x303c8b0, 0x28, 0x8, 0x0, 0x0, 0x0)

The contents of hStmt were same in all three statements at the time of core.
and the return value was 0 in all cases.
Can anybody tell me what could be wrong.



Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.