MySQL Forums
Forum List  »  Connector/C++

Re: unhandled type in getString() -- v1.0.5
Posted by: Dominic Froud
Date: June 22, 2009 12:56PM

Okay, I've narrowed it down to this:

pstmt = con->prepareStatement(sql);
res = pstmt->executeQuery();
delete pstmt;
/* using res causes fault */

Am I not allowed to clean up pstmt after calling executeQuery()?

I'm doing this because the code is in a method that creates a query on the fly and returns a ResultSet so it has to clean up the PreparedStatement before it returns the ResultSet or there will be a memory leak?

If the ResultSet uses data from PreparedStatement, maybe it could copy them first?

Any ideas?

Thanks,

Dominic

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: unhandled type in getString() -- v1.0.5
2561
June 22, 2009 12:56PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.