All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----COM.cloudscape.vti.UpdatableVTITemplate | +----JBMSTours.vti.jdbc1_2.ExternalCloudscapeTable
Here is an example SQL-J statement using this VTI class as an ExternalVirtualTable:
INSERT INTO NEW JBMSTours.vti.jdbc1_2.ExternalCloudscapeTable(
'jdbc:cloudscape:history', 'HotelBookings')
SELECT * FROM HotelBookings
NOTE: There is no need to define the getResultSetConcurrency method in this class, since the implementation in UpdatableVTITemplate already returns ResultSet.CONCUR_UPDATABLE.
In client/server environments: In some cases, even statements running in a client connection should use the embedded form of the URL because the VTI is instantiated within the cloudscape engine; if the database is accessible to the server in which Cloudscape is running, Cloudscape uses the embedded URL to access the external database.
If the database is running on an external server somewhere, use the client form of the URL as the first argument. However, this class does not automatically load the driver. You will have to load the client driver. in an SQL-J statement before instantiating the VTI. For example, for RmiJdbc, you could load the driver like this:
Values (CLASS java.lang.Class).forName('COM.cloudscape.core.RmiJdbcDriver')
Then, when instantiating the VTI, you would use a client form of the database connection URL:
INSERT INTO NEW JBMSTours.vti.jdbc1_2.ExternalCloudscapeTable( 'jdbc:cloudscape:rmi://localhost:1088/toursDB', 'HotelBookings') SELECT * FROM HotelBookings;
public ExternalCloudscapeTable(String url, String tableName)
public ResultSet executeQuery() throws SQLException
public ResultSetMetaData getMetaData() throws SQLException
public void close() throws SQLException
All Packages Class Hierarchy This Package Previous Next Index