Irishboy24 has asked for the wisdom of the Perl Monks concerning the following question:
hey monks, i wrote a simple perl script that connects to the db and fetches a row and prints it out. when i try to run the code it comes back saying that it cannot find DBI.pm in @INC. this same code was working a few weeks ago, so i am not sure what went wrong as i have not changed anything. i use CYGWIN.please help
#!/usr/bin/perl push (@INC, "D:\\Perl\\site\\lib"); use DBI; my $dbh = DBI->connect("dbi:SQL Server;database=Maddy17","Maddy",""); my $sth = $dbh->prepare ("select * from sysobjects where name = 'pub_titles' and type = 'P' and uid = USER_ID()"); my $sth->execute(); while (@row = $sth->fetchrow_aray()) { if (-e @row) { print "store proc exists\n"; } } my $dbh->disconnect();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Cant locate DBI in @INC
by almut (Canon) on Sep 17, 2009 at 15:48 UTC | |
by Irishboy24 (Sexton) on Sep 17, 2009 at 16:08 UTC | |
by almut (Canon) on Sep 17, 2009 at 16:24 UTC | |
|
Re: Cant locate DBI in @INC
by ELISHEVA (Prior) on Sep 17, 2009 at 16:18 UTC | |
by Irishboy24 (Sexton) on Sep 17, 2009 at 16:44 UTC | |
|
Re: Cant locate DBI in @INC (BEGIN)
by ikegami (Patriarch) on Sep 17, 2009 at 16:32 UTC |