|
|
sybperl-l Archive
Up Prev Next
From: John_Erjavec at cargill dot com
Subject: Re: Moving up from Sybperl 4.0 to Sybperl 5.0/web-to-sybas
Date: Nov 16 1998 7:24PM
This looks like the same error that I was getting when using ct_sql.
The problem I was having had to do with the way I was dereferencing
my variables. I don't have the rest of your post anymore, but here
is how I was getting at the variables (the right way):
+++++++++++++++++++CODE CHUNK++++++++++++++++++++++
$rows = $X->ct_sql("admin who", undef, 1) || die "execute failed!";
foreach $r (@$rows) {
if (($$r{'Name'} =~ /^DSI\s*$/) &&
($$r{'Info'} =~ /.+\..+/)) {
printf STDOUT "Name: %s -- Info: %s\n",
$$r{'Name'}, $$r{'Info'};
}
}
+++++++++++++++++++CODE CHUNK++++++++++++++++++++++
Like I said before, if there's a better way, let me know. *g* (I'm
thinking of trying this with the ct_execute method instead, and
processing it a row at a time, but I'm not sure which would be
better, faster, or more readable .)
-JEV
______________________________ Reply Separator _________________________________
Subject: Re: Moving up from Sybperl 4.0 to Sybperl 5.0/web-to-sybas
Author: mpeppler (mpeppler@mbay.net) at mtka-unix-mime
Date: 11/13/98 6:40 PM
Bahri Sofienne writes:
>
> i use CTlib to acess a data base, i want to use ct_sql("execute
> $Stored_proc....."),
> i have always this message error:
>
> Not a HASH reference at /logiciels/sybperl/lib/site_perl/Sybase/CTlib.pm
> line 895.
>
> $resultArray = $db->ct_sql( "execute $STORED_PROC $SP_ARGUMENTS", undef,
> TRUE );
Try changing the last argument to 1 instead of TRUE. I don't know why
that would make a difference, but you never know...
Michael
--
Michael Peppler -||- Data Migrations Inc.
mpeppler@mbay.net -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com
|