All,
 
We are facing the same problem when trying to execute a mysql 5.1 stored
procedure from nsmysql.
 
I have learned the original error  
Database operation "select" failed (exception Error, "PROCEDURE
MYDB.MYPROC can't return a result set in the given context")
 
is due to mysql not able to decide whether to return multiple or single
result set in the stored procedure.
The solution given by mysql is to set the CLIENT_MULTI_RESULT
<http://bugs.mysql.com/bug.php?id=24485>  flag while connecting to mysql
database.
 
My question is , where can I pass the connection flags in nsmysql?
 
I tried passing this as ns_param as given below:-
        # Database interface -- nsdb
        ns_section "ns/db/drivers" 
            ns_param mysqldriver nsmysql.so 
        
        ns_section "ns/db/pools" 
            ns_param mysqlpool "MySQLPool" 
        
        ns_section "ns/db/pool/mysqlpool" 
            ns_param driver mysqldriver
            ns_param connections 2 
            ns_param user $Reporting_DB_UserName 
            ns_param password <pwd>
            ns_param datasource <usr>
            ns_param verbose on 
            ns_param CLIENT_MULTI_RESULT 1 
 
        
        # Database pools accessible by server
        ns_section "ns/server/${servername}/db" 
            ns_param defaultpool "mysqlpool" 
            ns_param pools *
 
But this did not work!
Any pointers would be greatly appreciated!
 
 
Rajesh Nair
 
 
Hello Dossy,
An i using a too new libmysql? Does nsmysql needs updating to support this?
 
kind regards,
 
On Oct 25, 2007 3:41 PM, shedis <[EMAIL PROTECTED]> wrote:
> Without the call i get a different error message like:
> 
> Database operation "select" failed (exception Error, "You have an
> error in your SQL syntax; check the manual that corresponds to your
> MySQL server version for the right syntax to use near
> 'MYPROC('SCANRES,'2007-10-2' at line 1")
> 
> My ns_mysql version is:  Ns_MySQL_DriverInit(nsmysql):  Loaded
> Panoptic MySQL Driver v0.6, built on Jul 19 2007 at 19:30:40.
> 
> kind regards,
> 
> On Oct 25, 3:00 pm, Dossy Shiobara <[EMAIL PROTECTED]> wrote:
> > On 2007.10.24, shedis <[EMAIL PROTECTED]> wrote:
> >
> > > set sqlstmt "call MYPROC('SCANRES','2007-10-24 00:00:01','2007-10-24
> > > 23:59:59','%','%','%','%','%','%','%')";
> > ...
> > > Output:
> > > Database operation "select" failed (exception Error, "PROCEDURE
> > > MYDB.MYPROC can't return a result set in the given context")
> >
> > Remove the "call" from the SQL statement.  Do you still get the error?
> >
> > -- Dossy
> >
> > --
> > Dossy Shiobara              | [EMAIL PROTECTED] |http://dossy.org/
> > Panoptic Computer Network   |http://panoptic.com/
> >   "He realized the fastest way to change is to laugh at your own
> >     folly -- then you can let go and quickly move on." (p. 70)
> >
> > --
> > AOLserver -http://www.aolserver.com/
> >
> > To Remove yourself from this list, simply send an email to <[EMAIL 
> > PROTECTED]> with the
> 
> > body of "SIGNOFF AOLSERVER" in the email message. You can leave the 
> > Subject: field of your email blank.
> 
> 
> --
> AOLserver - http://www.aolserver.com/
> 
> To Remove yourself from this list, simply send an email to <[EMAIL 
> PROTECTED]> with the
> body of "SIGNOFF AOLSERVER" in the email message. You can leave the
Subject: 
> field of your email blank.
> 
 
 
--
AOLserver - http://www.aolserver.com/
 
To Remove yourself from this list, simply send an email to <[EMAIL
PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:

field of your email blank.

 



--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to