Hi, someone please help me.

I've just installed freetds, DBI, and DBD::Sybase and this is the
first program.
-----------
#! /good_directory_for_perl/perl -w
# fttest -- access MS-SQL7 using freetds

use strict;
use DBI;

$ENV{SYBASE} =  "/good_direcroty_for_freetds/freetds";
$ENV{LD_LIBRARY_PATH} =  $ENV{SYBASE}."/lib";
$ENV{DSQUERY} =  "GOOD_SERVERNAME_WHERE_REGISTERED_IN_INTERFACES";

my $db = "gooddatabase";
my $user = "gooduser";
my $pass = "goodpassword";

my $dbh = DBI->connect("dbi:Sybase:database=$db", $user, $pass, {RaiseError => 1, 
AutoCommit => 1});

my $sth = $dbh->prepare("select * from project where projectname = \"good project\"");

$sth->execute();
for (my @row = $sth->fetchrow_array) {
        print;
}

$sth->finish();
$dbh->disconnect();
-----------
And when I submitted this program, only I saw is the mesage follows;

  no statement executing at /srv/home/fuc/perl/fttest line 19.

the line 19 is $sth->execute(); but why? I hope I executed good query properly...

Could someone give me any suggetions?
Thank you very much in advance!

-- 
fukushi

Reply via email to