|
|
sybperl-l Archive
Up Prev Next
From: "Colin Miller " <col_mil at my-deja dot com>
Subject: Sybase::CTlib ct_sql && hash refs
Date: Jul 11 2000 12:42AM
Hello,
Hoping someone can shed some light on this...
I'm using "Sybase::CTlib" and are trying to get ct_sql to return data as a list of hash references (without passing it a sub), but get results as follows:
@LoHrefs = $dbh->ct_sql("$sql", null, 1);
----------------------------------------
Can't use string ("null") as a subroutine ref while "strict refs" in use at /atexcustom/perl/lib/site_perl/Sybase/CTlib.pm line 916.
Open Client Message:
Message number: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (159)
Message String: ct_cmd_drop(): user api layer: external error: This routine can be called only if the command structure is idle.
----------------------------------------
@LoHrefs = $dbh->ct_sql($sql, "", 1);
----------------------------------------
Can't use string ("") as a subroutine ref while "strict refs" in use at /atexcustom/perl/lib/site_perl/Sybase/CTlib.pm line 916.
Open Client Message:
Message number: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (159)
Message String: ct_cmd_drop(): user api layer: external error: This routine can be called only if the command structure is idle.
----------------------------------------
@LoHrefs = $dbh->ct_sql($sql, \sub {}, 1);
----------------------------------------
Not a CODE reference at /atexcustom/perl/lib/site_perl/Sybase/CTlib.pm line 916.
Open Client Message:
Message number: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (159)
Message String: ct_cmd_drop(): user api layer: external error: This routine can be called only if the command structure is idle.
----------------------------------------
@LoHrefs = $dbh->ct_sql($sql, sub {}, 1);
----------------------------------------
(Nothing - but $? == 0)
----------------------------------------
@LoHrefs = $dbh->ct_sql($sql, null, "CS_TRUE");
----------------------------------------
Not a HASH reference at /atexcustom/perl/lib/site_perl/Sybase/CTlib.pm line 916.
Open Client Message:
Message number: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (159)
Message String: ct_cmd_drop(): user api layer: external error: This routine can be called only if the command structure is idle.
----------------------------------------
@LoHrefs = $dbh->ct_sql($sql, sub {}, "CS_TRUE");
----------------------------------------
Not a HASH reference at /atexcustom/perl/lib/site_perl/Sybase/CTlib.pm line 916.
Open Client Message:
Message number: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (159)
Message String: ct_cmd_drop(): user api layer: external error: This routine can be called only if the command structure is idle.
----------------------------------------
Note:
I can get hash refs using Sybase::DBlib - but would really like to get them from Sybase::CTlib.
Any help appreciated!
Thanks
=========================
\^/
[0|0] col_mil@my-Deja.com
<#>
=========================
--== Sent via Deja.com http://www.deja.com/ ==--
Before you buy.
|