Folks,
While attempting to connect to a sql server, i'm receiving the following
message...

Can't locate auto/DBI/prepare.al in @INC (@INC contains: C:/Perl/lib
C:/Perl/site/lib .) at sql.pl line 52

Now I know that the script is connecting to the sql server, but once I
call that prepare it dies.  The code follows...

my $DSN = "driver={SQL 
Server};server=$target;database=master;uid=*****;pwd=*****;";

my $dbh = DBI->connect("dbi:ODBC:$DSN") or die "Cannot Connect";

my $variable = ("EXEC master.dbo.xp_cmdshell 'dir'");

$dbh->do($variable);

my $result = DBI->prepare($variable);

if ( !defined $result ) {
        die "Cannot prepare statement - $DBI::errstr\n";
}

$result->execute                        or die "Cannont execute procedure";

As you can see it's not doing anything that dramatic at the moment, as i'm
just learning learning DBI.


Any assistance would be welcome.

Cheers,
David.

--
'For a while the average net surfer had an above
average intelligence, unfortunately those days are over.'

Reply via email to