|
|
sybperl-l Archive
Up Prev Next
From: Timothy Kimball <kimball at stsci dot edu>
Subject: Silently failing query
Date: Mar 11 1996 3:40PM
A friend of mine is trying to do this:
$query = <<"EOQ";
declare \@tdate datetime
select \@tdate = '$date1'
select convert(char(12),\@tdate,107)
EOQ
die if $db1->dbcmd($query) == &FAIL;
die if $db1->dbsqlexec == &FAIL;
die if $db1->dbresults == &FAIL;
($the_date) = $db1->dbnextrow;
the idea being to first assign $date1 to a datetime variable
to verify that it's a valid datetime format, and then convert it
to the format she wants (returned into the $the_date scalar).
However, when we run this script, $the_date comes up empty. Now we can
run this query from isql and it works; why doesn't it work in sybperl?
and why does it fail silently? if sybperl has a problem with running
this query, shouldn't it complain?
--
Tim Kimball
kimball@stsci.edu
|