Have a Question?
Print

01214: How to get a list of SPROCs from a BBj program

Title:

How to get a list of SPROCs from a BBj program

Description:

Here is a simple BBj program that will print out a list of SPROCs in a database along with their descriptions. The java.sql.DatabaseMetaData interface in the Java API docs contains the information about SPROCs (or other database items like tables, functions, indexes, etc.). 


!dbMeta in the sample code is an instance of this interface. 

bbj! = BBjAPI() 
con! = bbj!.getJDBCConnection(“ChileCompany”, “uid=admin,pwd=admin123”) 
dbMeta! = con!.getMetaData() 
rs! = dbMeta!.getProcedures(“”, “”, “%”) 
while (rs!.next()) 
print rs!.getString(“PROCEDURE_NAME”) + “: ” + rs!.getString(“REMARKS”) 
wend 
rs!.close() 
con!.close() 



Last Modified: 11/04/2009 Product: BBj Operating System: All platforms

BASIS structures five components of their technology into the BBx Generations.

Table of Contents
Scroll to Top