Hi,
Scott Phelps wrote:
> I am new to DBI and have been trying to find an example of running a stored
> procedure in MS-SQL. I have a simple search stored procedure that I need to
> pass keywords to and receive a recordset back from. Would anyone mind
> terribly giving any examples?
I think it is done as usual, at least how it works for me (I use Sybase though):
$sth = $dbh -> prepare (sprintf 'my_proc %s, %s', $dbh -> quote ($user),
$dbh -> quote ($pass));
$sth -> execute;
while ($aref = $sth -> fetchrow_arrayref)
{
# do something with results (if there are any)
}
> I'd appreciate the help, the DBI docs just say "Calling stored procedures is
> currently not defined by the DBI", but I know it can be done!
Have you looked into DBD::Sybase and FreeTDS if you're accessing MS SQL from UNIX?