Hi Massimo,
With MySqlTcl
set sql {call getSubPackages(72,'name','asc',0,50)}
set query [::mysql::query $dbhandle_ $sql]
while {[set row [::mysql::fetch $query]]!=""} {
puts $row
}
::mysql::endquery $query
I get the correct result:
170 {quotelist xfinance} {2014-08-26 10:39:00} 0 1 0 0 1
On Thu, Nov 13, 2014 at 4:13 AM, Massimo Manghi <[email protected]>
wrote:
> 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.
>>
>