"Barbara Deaton" <[EMAIL PROTECTED]> wrote on 12/01/2005 09:56:44 AM:

> All,
> 
> I'm actually looking for a RTFM reply here.  I need to simulate 
> SQLSetPos and SQLBulkOperations in my application which is written 
> with the MySQL C API.  I thought MySQL 5.0 was supposed to have 
> cursor support, but the only thing I can find in the documentation 
> is regarding server side cursors via stored procedures.
> 
> Are cursors supported outside of stored procedures, if so where can 
> I find this information?  I've googled "mysql cursor support" and 
> they all take me back to the same place in the doc:  17.2.11. Cursors.
> 
> Thanks for the information.
> 
> -Barb.
> 

Could the "HANDLER" set of commands work for your needs? I know it's not 
the same but I offer it as an alternative. 
http://dev.mysql.com/doc/refman/5.0/en/handler.html

AFAIK cursors are supported only within stored procedures AND functions. 
Technically, that's a "yes" to your question. However I think you were 
asking if you could have a cursor in a stand-alone SQL script and I 
believe they cannot be exist in that environment, yet.

I am not sure how much effort it's going to be to enhance the user's 
session to be able to host cursors just as a SPROC's session can but I am 
pretty sure it's in the works already. Until then, your the CURSOR 
commands will only function properly in PROCEDUREs or FUNCTIONs.

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine


Reply via email to