Re: Syntax for calling stored procedure from Perl Script

2004-04-22 Thread Chris Faust
d the values in order (which is a pain). I've found all the higher methods (selectall_arrayref, hashref, DO etc) all work pretty much exactly the same way. Hope this helps. -Chris - Original Message - From: "v79k" <[EMAIL PROTECTED]> To: "Chris Faust"

Re: Syntax for calling stored procedure from Perl Script

2004-04-21 Thread v79k
Thanks. It worked. And what about output parameters? Suppose the stored procedure returns a count. How do we do that? Sorry, but this just came up. Is there a website that I can refer that has code snippets and the syntax to call stored procedures from Perl with FreeTDS? Mailing list is fine, b

Re: Syntax for calling stored procedure from Perl Script

2004-04-21 Thread Michael Peppler
On Tue, 2004-04-20 at 21:10, v79k wrote: > Hi, > Sorry, I forgot to mention that I use FreeTDS with > DBD::Sybase by Micheal Peppler. > > I know that around November 2003, no place holders > were allowed for FreeTDS but also that they were to > fix that problem soon. Hopefully they have gotten > a

Re: Syntax for calling stored procedure from Perl Script

2004-04-20 Thread v79k
Hi, Sorry, I forgot to mention that I use FreeTDS with DBD::Sybase by Micheal Peppler. I know that around November 2003, no place holders were allowed for FreeTDS but also that they were to fix that problem soon. Hopefully they have gotten around to do that! Thanks, vk. --- v79k <[EMAIL PROTECT

Re: Syntax for calling stored procedure from Perl Script

2004-04-20 Thread Chris Faust
Here is a simple example of a SP and the code for it that I use. create procedure SavePlanMember @iPlanId int, @iUserId int as INSERT INTO PlanMembers (iPlanId, iUserId) VALUES (@iPlanId, @iUserId) my $sth = $db->prepare(qq|SavePlanMember [EMAIL PROTECTED] = , [EMAIL PROTECTED] = 1|) or

RE: Syntax for calling stored procedure from Perl Script

2004-04-20 Thread Elliot . Fielstein
vk, I routinely use this syntax in perl scripts to call SQL Server 2000 stored procedures that accepts parameters (error checking deliberately omitted): $query = "{ call your_sp($param1, $param2, $param3) }"; $sel = $dbh->prepare( $query ); Hope helpful, Elliot Elliot M. Fielstein, Ph.D. Assi

RE: Syntax for calling stored procedure from Perl Script

2004-04-20 Thread Helck, Timothy
I've never done this in SqlServer, but this is how you can do it in Oracle. Use the bind_param and/or bind_param_inout methods: $csr->bind_param(1, $input); $csr->bind_param_inout(2, \$result, 13); $csr->execute(); The first argument is position of the placeholder. The se