aspose file tools*
The moose likes JDBC and the fly likes How to read the procedure code using sp_helptext Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to read the procedure code using sp_helptext" Watch "How to read the procedure code using sp_helptext" New topic
Author

How to read the procedure code using sp_helptext

Elizabath Lima
Ranch Hand

Joined: Nov 23, 2005
Posts: 32
Hi,

Would you please tell me how i can read the stored procedure code from my sybase database through a java program. I read about sp_helptext.
How can i use to get the procedure code?
I'm calling the procedure using call dbadmin.GetRecords(). How can i get the same procedures code using some java code?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19543
    
  16

Tested in MSSQL, probably also works (with some tweaks perhaps) with SyBase.

This works for both views and stored procedures.
[ January 07, 2008: Message edited by: Rob Prime ]

SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Elizabath Lima
Ranch Hand

Joined: Nov 23, 2005
Posts: 32
Yes, It is working without any issues.
Thanks Rob
 
jQuery in Action, 2nd edition
 
subject: How to read the procedure code using sp_helptext
 
Similar Threads
Regarding reultset in stored procedures
How to Pass %ROWTYPE as Input parameter for a Procedure?
Store Procedure
CLOBS
getting the resultset of a stored procedure?