Main Menu

KB#01214-How to get a list of SPROCs from a BBj program


How to get a list of SPROCs from a BBj program


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") 

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

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

View BASIS LinkedIN Profile Visit our Twitter Feed Check out our Facebook Public Profile Click to View the BASIS youTube channel