Using the Database Class Utilities
Page 2 of 3

Storing Jar Files in a Database

dbclasses, or COM.cloudscape.tools.dbclasses, is a utility that allows you to store jar files in a database.

You can use the utility within an SQL-J statement or on the command line. When used within an SQL-J statement, the utility stores jar files in the database of the current connection. When you use it on the command line, you specify the database connection URL of the database in which to store the jar files.

Working with the Utility

Your jar file has a physical name (the name you gave it when you created it) and a Cloudscape name (the Cloudscape identifier you give it when you load it into a particular schema). Its Cloudscape name is an SQL92Identifier; it can be delimited and must be unique within a schema. A single schema can store more than one jar file.

Adding a Jar File

The syntax for the command-line utility (COM.cloudscape.tools.dbclasses) to add a jar file is:

java COM.cloudscape.tools.dbclasses add
databaseConnectionURL qualifiedJarNameInCloudscape
jarFilePath

The SQL-J syntax to add a jar file is:

CALL dbclasses.addJar('  schema', '  jarNameInCloudscape',
' jarFilePath')

Removing a Jar File

The syntax for the command-line utility to remove a jar file is:

java COM.cloudscape.tools.dbclasses remove
databaseConnectionURL qualifiedJarNameInCloudscape

The SQL-J syntax to remove a jar file is:

CALL dbclasses.removeJar ('  schema', '  jarNameInCloudscape') 

Replacing a Jar File

The syntax for the command-line utility to replace a jar file is:

java COM.cloudscape.tools.dbclasses replace
databaseConnectionURL qualifiedJarNameInCloudscape jarFilePath

The SQL-J syntax to replace a jar file is:

CALL dbclasses replaceJar('  schema', '  jarNameInCloudscape',
' jarFilePath')

Complete Examples

For more information about storing classes in a database, see the Cloudscape Developer's Guide.