|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.net.sharenet.ShareNetDriver
public class ShareNetDriver
ShareNetDriver class implements the Driver interface.
The DriverManager will try to load as many drivers as it can find and then for any given connection request, it will ask each driver in turn to try to connect to the target URL.
When a Driver class is loaded, it should create an instance of itself and register it with the DriverManager. This means that a user can load and register a driver by doing Class.forName("foo.bah.Driver").
ShareNetConnection
Field Summary | |
---|---|
static int |
majorVersion
|
static int |
minorVersion
|
Constructor Summary | |
---|---|
ShareNetDriver()
Constructs a ShareNetDriver object and registers the SAS/SHARE driver for JDBC with the java.sql.DriverManager. |
Method Summary | |
---|---|
boolean |
acceptsURL(java.lang.String url)
Returns a value of True if the driver accepts this style of URL and the specified server. |
java.sql.Connection |
connect(java.lang.String url,
java.util.Properties info)
Attempts to make a database connection to the server specified by the URL. |
int |
getMajorVersion()
Gets the driver's major version number. |
int |
getMinorVersion()
Gets the driver's minor version number. |
java.sql.DriverPropertyInfo[] |
getPropertyInfo(java.lang.String url,
java.util.Properties info)
Gets a DriverPropertyInfo object that lists the properties for the SAS/SHARE driver for JDBC. |
boolean |
jdbcCompliant()
Returns whether the Driver is JDBC COMPLIANT. |
Field Detail |
---|
public static final int majorVersion
public static final int minorVersion
Constructor Detail |
---|
public ShareNetDriver() throws java.sql.SQLException
java.sql.SQLException
- This exception is thrown if a ShareNetException is detected.Method Detail |
---|
public java.sql.Connection connect(java.lang.String url, java.util.Properties info) throws java.sql.SQLException
connect
in interface java.sql.Driver
url
- The URL of the database to connect to.
The connect method accepts a string representation of a URL and a java.util.Properties object as input. If the URL does not specify sharenet, a NULL is returned.
The URL must be of the form:
jdbc:sharenet://hostname:portnumberwhere
hostname
is the name of the machine where the SAS/SHARE server is running,
and portnumber
is the port the SAS/SHARE server is configured to use.
info
- A list of connection arguments.
user
password
shareUser
user
sharePassword
password
appname
sapw
pt2dbpw
librefs
librefs property.
The librefs property value must be specifies as follows:
(libname 'filepath'; libname 'filepath';...)
dbms
- The name of the DBMS your program will access; the value must be eight characters padded with blanks.
The default is "SQLVIEW ", which specifies that SAS data sets will be accessed. If you are accessing SPDS,
use the keyword "SPDS".
If you are not accessing SAS data, specify the name of the foreign DBMS as it is defined using
SAS/ACCESS software.
dbmsOptions
- Options for the foreign DBMS your program will access. Specify the options as you specify the database-definition arguments when using the
PROC SQL statement CONNECT TO.
dbms_options
- Deprecated. Replaced by
dbmsOptions
remarks
- A Boolean value that determines whether the SAS/SHARE driver for JDBC returns the data
set label for each data set in the library that your program accesses. If the value is
True, the labels are returned; the default value is False.
Note: When this property is set to True, any operation that involves reading and returning data set labels can
result in poor performance because each data set must be opened in order to read the label. For example,
if this property is set to True, performance may be degraded when using the ShareNetDatabaseMetaData.getTables()
method to retrieve a description of the tables in a catalog.
undoPolicyNone
- A Boolean value that determines whether changes to the data are undone when an UPDATE or INSERT statement
generates errors. When the value is set to True (the recommended setting), the changes are not undone; when
the value is set to False, the server attempts to undo the changes.
routerUrl
- The URL of the Message Router. The
routerUrl
property value must be specifies as follows:
(routerUrl http://your_server/cgi-bin/shrcgi)
where http://your_server/cgi-bin/shrcgi
is the URL of the Message Router (shrcgi
or shrcgi.exe
), one
of the tunnel feature's server programs.
java.sql.SQLException
- This exception is thrown if a ShareNetException is detected.public boolean acceptsURL(java.lang.String url) throws java.sql.SQLException
acceptsURL
in interface java.sql.Driver
url
- The URL of the database.
java.sql.SQLException
- This exception is thrown if a ShareNetException is detected.public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url, java.util.Properties info)
getPropertyInfo
in interface java.sql.Driver
url
- The URL of the database to connect to.info
- A list of tag/value pairs.
connect(String, java.util.Properties)
public int getMajorVersion()
getMajorVersion
in interface java.sql.Driver
public int getMinorVersion()
getMinorVersion
in interface java.sql.Driver
public boolean jdbcCompliant()
jdbcCompliant
in interface java.sql.Driver
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |