On 16-Jul-2004 PerlDiscuss - Perl Newsgroups and mailing lists wrote: > I am trying to run an MS SQL server stored procedure using Perl. > We are using SQL Server 2000. Using the current Perl and DBI. > Can I use the ODBC DBD? > I am using a prepare,execute and fetch. > Has anyone tried this and do you have examples or how to do this? > I use the 'exec' command but get syntax errors on the execute for the > parameters provided. The prepare doesn't produce any errors. > > my $query = "exec sp_query @criteria = 0"; > my $sth = $dbh->prepare($query); > $sth->execute();
I believe there are examples in the sqlserver test file in the subdir t of DBD::ODBC distribution. Those examples work for me using DBD::ODBC. Martin -- Martin J. Evans Easysoft Ltd, UK Development
