Visual Cafe Pro Language Reference Constructor index | Method index | Bottom

Class: symantec.itools.db.pro.Session

Purpose Connects to a dbANYWHERE Server.
Hierarchy java.lang.Object
|
+----symantec.itools.db.pro.Session
Syntax public class Session
extends Object
Description Session connects to a dbANYWHERE Server and provides access to the dbANYWHERE classes.

Constructor Index

Method index | Top | Bottom
Session(String)
 o Creates a Session object.

Method Index

Constructor index | Top | Bottom
close( )
 o Closes all connections to a dbANYWHERE Server.
createView
 o Creates a root RelationView for a new MultiView transaction.
 o Syntaxes:
createView(String)
createView(String, Vector)
createView(ConnectionInfo, String)
createView(ConnectionInfo, String, Properties)
createView(ConnectionInfo, String, Vector)
createView(ConnectionInfo, String, Vector, Properties)
getMetaData(ConnectionInfo)
 o Returns a SessionMetaData object.
getRequest( ) and getRequest(String)
 o Creates a Request object.
getServerURL( )
 o Returns a dbANYWHERE Server's URL.
inquireDSN( )
 o Returns a list of a dbANYWHERE Server's databases (DSNs).
setDefaultConnection(ConnectionInfo)
 o Sets default database connection information.
setLogonObject(Logon)
 o Sets the Logon Failure Handler.

Constructors

Constructor index | Method index | Top | Bottom

Constructor: Session

Purpose Creates a Session object.
Syntax public Session(String serverURL) throws SQLException
Parameters serverURL = The URL string to connect to the dbANYWHERE server.
Description Creates a dbANYWHERE connection.

Methods

Constructor index | Method index | Top | Bottom

Method: close

Purpose Closes all connections to a dbANYWHERE Server.
Syntax public void close( ) throws SQLException
Parameters None.
Description Closes a connection to a dbANYWHERE Server.

Method: createView

Purpose Creates a root RelationView for a new MultiView transaction.
Syntax public RelationView createView(String sql) throws SQLException
public RelationView createView(String tablename,
Vector columns) throws SQLException
public RelationView createView(ConnectionInfo conn,
String sql) throws SQLException
public RelationView createView(ConnectionInfo conn,
String sql,
Properties requestProps) throws SQLException
public RelationView createView(ConnectionInfo conn,
String tablename,
Vector columns) throws SQLException
public RelationView createView(ConnectionInfo conn,
String tablename,
Vector columns,
Properties requestProps) throws SQLException
Parameters sql = SQL statement with OUT or IN/OUT parameters specified through '?' characters in the statement.

tablename = Name of a database table.

columns = java.util.Vector object that contains Strings which are column names.

conn = ConnectionInfo object.

requestProps = java.util.Properties object containing Request object properties.

Description Creates a root RelationView for a new MultiView transaction.
  1. If you don't use the conn parameter, you need to call Session.DefaultConnection to set the database connection information before calling createView.
  2. If you don't use the requestProps parameter, createView uses the default Request properties.
  3. If you use the tablename and columns parameters, createView constructs a SQL statement based on these values. Otherwise, createView uses the sql parameter for the SQL statement.
  4. createView executes the SQL statement, thus creating a MultiView object with a root RelationView object.
  5. createView returns the RelationView object.

Since the RelationView class provides methods that access a RelationView's MultiView, you can perform most operations without referring to the MultiView object.

See also java.util.Properties (in the Java API Documentation)
java.util.Vector (in the Java API Documentation)

Method: getMetaData

Purpose Returns a SessionMetaData object.
Syntax public SessionMetaData getMetaData(ConnectionInfo conn) throws SQLException
Parameters conn = ConnectionInfo object.
Description Retrieve a SessionMetaData object. The SessionMetaData class is designed to answer requests for information of a generic nature about a specific database connection through the current Session. SessionMetaData is an expansion of the JDBC DatabaseMetaData class.

Returns a SessionMetaData object. It may be used to obtain information specific to the database connection that was specified.

See also SessionMetaData, Properties

Method: getRequest

Purpose Creates a Request object.
Syntax public Request getRequest( ) throws SQLException
public Request getRequest(String sql) throws SQLException
Parameters sql = SQL statement.
Description Creates a Request object that can be used to create a root RelationView for a new MultiView. The Request object is initialized with the default ConnectionInfo object, an empty SQL string, and default Request properties.
See also ConnectionInfo
Request

Method: getServerURL

Purpose Returns a dbANYWHERE Server's URL.
Syntax public String getServerURL( ) throws SQLException
Parameters None.
Description Retrieves the URL used to connect to the server.

Method: inquireDSN

Purpose Returns a list of a dbANYWHERE Server's databases (DSNs).
Syntax public RelationView inquireDSN( ) throws SQLException
Parameters None.
Description Returns a list of a dbANYWHERE Server's databases (DSNs). The method will return a RelationView object that may be used to get DSN name, description, engine, server, and database information. The RelationView returned is a read only object, and will not support modifications to data.

Returns a RelationView object whose rows describe the data sources.


Method: setDefaultConnection

Purpose Sets default database connection information.
Syntax public void setDefaultConnection(ConnectionInfo conn) throws SQLException
Parameters conn = ConnectionInfo object.
Description Installs a ConnectionInfo object containing the default database connection information used to retrieve Request objects when calling getRequest.

Method: setLogonObject

Purpose Sets the Logon Failure Handler.
Syntax public void setLogonObject(Logon logonObj) throws SQLException
Parameters logonObj = Handler for LogonFailure.
Description Installs an object implementing the Logon interface as the new LogonFailure Handler.

Constructor index | Method index | Top

Copyright © 1996 Symantec Corporation. All rights reserved.