what do you get from mysqltcl?

the relevant code in DIO::exec is

if {[catch {$cmd $conn $req} error]} {
    set errorinfo $error
    set obj [result Mysql -error 1 -errorinfo [::list $error]]
    return $obj
}
if {[catch {mysqlcol $conn -current name} fields]} { set fields "" }

set obj [result Mysql   -resultid   $conn               \
                        -numrows    [::list $error]     \
                        -fields     [::list $fields]]
return $obj

where 'cmd' is 'mysqlexec'. It's all about what mysqlcol returns, if it returns valid data they should go into 'obj' through the public variable numrows as in case of no errors actually the variable 'error' actually stores the result returned by $cmd $conn $req.

 -- Massimo

On 11/13/2014 04:30 AM, Brice Hamon wrote:
Hi guys,

Just a quick question: does DIO support Stored Procedure Call?

When I run that sql by hand
                    call getSubPackages(72,'name','asc',0,50);
in MySql workbench  I get 1 row which is correct.

In my Rivet code I have:

if {[catch {
set sql {call getSubPackages(72,'name','asc',0,50);}
set res [DIO exec $sql]
log [$res errorinfo]
log [$res errorcode]
set numrows [$res numrows]
log $numrows
} err]} {
     log "caught $err"
}

I get:

Nov 12 22:23:11:
Nov 12 22:23:11: 0
Nov 12 22:23:11: 0

No Errors, no rows.

Is there something specific to Stored Procedure?

I am using Mysql and Rivet 2.1 on Linux Suse.

Thank you,
Brice.

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscr...@tcl.apache.org
For additional commands, e-mail: rivet-dev-h...@tcl.apache.org

Reply via email to