Sybperl documentation / using stored procedures 
Author Message
 Sybperl documentation / using stored procedures

I've been searching the net for some info on Sybperl in general and
about using/calling stored procedures.....i didn't find much
information on these subjects....can anyone point me to some
interesting sites?

Thanks in advance

PS. I've already seen the Sybperl pages by M.Peppler......

Sent via Deja.com http://www.*-*-*.com/
Share what you know. Learn what you don't.



Tue, 18 Dec 2001 03:00:00 GMT  
 Sybperl documentation / using stored procedures

Quote:

> I've been searching the net for some info on Sybperl in general and
> about using/calling stored procedures.....i didn't find much
> information on these subjects....can anyone point me to some
> interesting sites?

You probably need to read up on calling stored procs via OpenCLient in
the Sybase manuals (available at http://sybooks.sybase.com)

Sybperl is a thin layer between Sybase OPenCLient (either DBlibrary or
Client Library),  so nearly everything that is documented in the Sybase
manuals works the same way for sybperl.

In short however:

You can execute a stored proc just like any other SQL call. If the
proc returns OUTPUT parameters then it gets just a little more tricky, as you
need to declare the Sybase T-SQL variables before calling the procs, or
use the RPC calls (dbrpc*() or ct_command()/ct_param()). Something like:

$sql = "


";
$dbh->ct_execute($sql);
while($dbh->ct_results($restype) == CS_SUCCEED) {
    next unless $dbh->ct_fetchable($restype);
    if($restype == CS_PARAM_RESULT) {   # It's the OUTPUT param....

            $return_val = $d[0];
       }
    } else {
       # It's something else...

           ... # do something here!
       }
    }

Quote:
}

There are examples for the rpc calls in the eg/ directory of the sybperl
distribution.

Michael
--
Michael Peppler         -||-  Data Migrations Inc.

Int. Sybase User Group  -||-  http://www.isug.com



Tue, 18 Dec 2001 03:00:00 GMT  
 Sybperl documentation / using stored procedures
Hi,

 I have backend as Sybase. I am using sybperl to connect to sybase from
perl.

 Whenever user executes a query(from the browser), the query is sent to
the sybase by perl and the results generated by sybase are sent back to
the browser.

 Is there a way to display the result as x number of rows (for example
50 rows) at a time, so that when the user reads it all, he can get the
next 50 rows (by clicking "more" button, for example) and so on.

 One way of doing this would be to keep track of the rowcount of the
last row of the result set and then next time display the result from
that row onwards. But is there any other way?

 Any help on this matter will be highly appreciated.

Thanx.

Raj

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.



Mon, 24 Dec 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Sybperl stored procedure output

2. sybperl: obtaining return code from stored procedure

3. Calling stored procedure from sybperl

4. Sybperl and stored procedures

5. Sybperl & Stored Procedures

6. LONG: Req: Help in retrieving values from SQL Server stored procedure using Win32::ODBC

7. Executing Stored Procedures using Win32::ODBC

8. HELP: Need a little help on using PerlV5.003 with a Sybase stored procedure

9. HELP: Need a little help on using PerlV5.003 with a Sybase stored procedure

10. Using Embedded SQL vs Stored procedures in Perl DBI?DBD for Oracle

11. stored procedure without using Win32::OLE

12. Returning results from a stored procedure/function using DBI and Oracle

 

 
Powered by phpBB® Forum Software