|
|
sybperl-l Archive
Up Prev Next
From: Jeff Williams <Jeffrey dot L dot Williams at mci dot com>
Subject: Question on Results from a Select
Date: Sep 18 1998 6:12PM
All,
I am just beginning to use SybPerl. I have successfully connected to my
database. However, I have a question on testing the results from an "sql (
select...)" style statement.
I have a process that will need to insert values to a table. However, I
want to check that the value is not in the table first. So I end up with
this:
...
$d = new Sybase::DBlib $user, $passwd;
$d->dbuse ("database");
$ref = $d->sql("select * from table where column = value");
After properly dereferencing $ref, I want to make sure that it is pointing
to either value or "nothing". It is the "nothing" part that I am having
trouble with. I have tried using defined, checking against null, etc but
to no avail. I have even tried playing with
"$Sybase::DBlib::Att{"dbNullIsUndef"} = FALSE;" but that doesn't work
either.
Am I totally off base or can someone help me with this?
Thanks in advance.
Jeff W.
|