List:General Discussion« Previous MessageNext Message »
From:SGreen Date:December 1 2005 3:25pm
Subject:Re: Cursor support
View as plain text  
"Barbara Deaton" <Barbara.Deaton@stripped> 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.

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

Cursor supportBarbara Deaton1 Dec
  • Re: Cursor supportPeter Brawley1 Dec
  • Re: Cursor supportSGreen1 Dec
  • Re: Cursor supportPaul DuBois1 Dec