2 Mar 2003 10:46
- Re: unixODBC: Prepared statements and invalid cursors
Nick Gorham <nick <at> easysoft.com>
2003-03-02 09:46:40 GMT
2003-03-02 09:46:40 GMT
John Anderson wrote: >> >>I would expect you to need a SQLCloseCursor or SQLFreeStatement( , >>SQL_CLOSE ) after the SQLFetchScroll returned SQL_NO_DATA. >> >>I havn't got the docs at home at the moment, but I will check on monday, >>but AFAIK the SQLFetchScroll returning SQL_NO_DATA will not return the >>statement to when it can be prepared, there is still a result set in >>existance, you could (for example) scroll backwards. > > > Isn't this how prepared statements are supposed to work? You prepare it > once, and then you can bind parameters to it several times? Not thats fine, but you need to close the result set. if you have a result set the sequence is SQLPrepare SQLBind SQLExecute SQLFetch... SQLCloseCursor SQLExecute SQLFetch... SQLCloseCursor if you havn't got a result set creating stmt SQLPrepare(Continue reading)
RSS Feed