Tami King writes:
 > Hello,
 > 
 > Is there a limit on the size of a statement that you can 'prepare' or 
 > 'do' in DBI?  I am trying to create a stored procedure on Sybase using 
 > DBI and DBD::Sybase.  It looks a little bit like this:
 > 
 > $rv = $dbh->do(<<EOF
 > create procedure sp_myhelp
 > \@objname varchar(92) = NULL
 > with recomile as
 > ...
 > EOF
 > );
 > 
 > This works fine with small stored procedures, but I have one large one
 > that I need to create.  It is basically a modified version of sp_help
 > and is almost 300 lines long.  
 > 
 > These are the errors from $dbh->errstr when the prepare or do fails:
 > 
 > Server message number=111 severity=15 state=1 line=1 procedure=DBD41c6
 > text=PREPARE must be the first command in a query batch.

The problem is that DBD::Sybase thinks that your procedure text is a
statement with ?-style placeholders, and sends it to ct_dynamic()
instead of ct_command().

Could you send me the text of the proc please?

Thanks!

Michael
-- 
Michael Peppler - Data Migrations Inc. - [EMAIL PROTECTED]
http://www.mbay.net/~mpeppler - [EMAIL PROTECTED]
International Sybase User Group - http://www.isug.com
Sybase on Linux mailing list: [EMAIL PROTECTED]

Reply via email to