|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sd.odbc.ODBC
This class has a few static native functions that allow the user to effectively manage ODBC DataSource names. Here is a list of the functionality they provide:
1. Obtain a list of all registered DataSource names.
2. Obtain a list of all installed ODBC drivers.
3. Register a new DataSource name.
4. Unregister a DataSource name.
To use it, please make sure that SD-ODBC.dll is placed in a directory included in your PATH variable.
Method Summary | |
static DataSource[] |
getDataSources()
Native function that returns all registered ODBC data source names. |
static ODBCDriver[] |
getDrivers()
Native function that returns all installed ODBC drivers. |
static DataSource |
registerDataSource(java.lang.String dsn,
java.lang.String driver,
java.lang.String attributes)
Native function that registers a DataSource name. |
static boolean |
unregisterDataSource(java.lang.String dsn,
java.lang.String driver)
Native function that unregisters a DataSource name. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Method Detail |
public static DataSource[] getDataSources()
public static ODBCDriver[] getDrivers()
public static DataSource registerDataSource(java.lang.String dsn, java.lang.String driver, java.lang.String attributes)
dsn
- the name of the DSN to be registereddriver
- the name of the driver to be used for registeration.
For example: "Microsoft dBase Driver (*.dbf)".attributes
- a string with additional arguments. Each entry follows
the syntax "key=value;".
For example: "DefaultDir=c:\\data;".
For more information please refer to the ODBC documentation
for the specific driver used.public static boolean unregisterDataSource(java.lang.String dsn, java.lang.String driver)
dsn
- the name of the DSN to be unregistereddriver
- the name of the driver to be used for unregisteration.
For example: "Microsoft dBase Driver (*.dbf)".
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |