 
 |
You Are Here: SAP DB > 7.3 > Interfaces > JDBC > JDBC Driver
SAP DB is now SAP MaxDB! For more information, visit the SAP MaxDB pages in the SAP Developer Network.
SAP DB: JDBC Driver
Features
- 100 Percent pure Java
- Supports JDK 1.2 and higher
- Supports JDBC 2.0 (with JDK 1.2)
- Supports JDBC 3.0 (with JDK 1.4)
- Supports the JDBC 2.0 Standard Extension API (DataSource, XADataSource and ConnectionPoolDataSource)
- Type 4 driver (connects using the proprietary SAP DB socket protocol)
Connect Properties
Connect properties can be specified either as the info parameter
of DriverManager.getConnection or as part of the URL (
jdbc:sapdb://host/dbname?autocommit=off&timeout=30).
Complete syntax: jdbc:sapdb:[//host/]dbname[?name=value[&name=value]*]
The following properties can be specified:
user |
The database user |
password |
The user's password |
sqlmode |
One of the supported sql modes [INTERNAL | ORACLE] (default is INTERNAL) |
cache limit |
The cache limit of the session |
timeout |
The command timeout in seconds |
isolation |
The isolation level can be specified either as a string (TRANSACTION_READ_UNCOMMITTED, TRANSACTION_READ_COMMITTED,
TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE) or as the equivalent integer value
(as declared in java.sql.Connection). |
autocommit |
off disables autocommit mode |
reconnect |
off disables implicit reconnection after connection timeout |
trace |
The argument is used as a file name. All trace output is written to this file. |
tracesize |
The argument is used as the maximum number of lines in the trace file. The trace is written cyclically. |
transport |
=socket |
Uses 100 percent pure Java on sockets |
|
=native |
Uses the SAP DB runtime (faster for local communication) |
|
If sapdbcbin.dll/libsapdbcbin.so was loaded, the default is =native,
otherwise the default is =socket. |
|
cache |
PreparedStatements are cached within the JDBC-driver for re-use. This probably improves the performance of
your application.
=all |
All types of SQL statements are cached |
=[s][i][u][d] |
s |
SELECT statements are cached |
|
i |
INSERT statements are cached |
|
u |
UPDATE statements are cached |
|
d |
DELETE statements are cached |
Example: If you define cache=siu, all SELECT-, INSERT-, and UPDATE statements are cached.
Default is a disabled caching.
|
unicode |
=yes |
Uses Unicode encoding for SQL statements, user name and password |
|
System Properties
com.sap.dbtech.jdbc.loadbin
- Controls loading of native methods,
possible values are:
no |
Does not load native methods |
yes |
Loads native methods |
Default is yes.
Exceptions
com.sap.dbtech.jdbc.exceptions.DatabaseException
- The error is the result of an SQL statement.
Subclass
com.sap.dbtech.jdbc.exceptions.PrepareException
- The error occured while the statement was being prepared.
com.sap.dbtech.jdbc.exceptions.JDBCDriverException
- The error was detected by the driver.
Subclasses
|
InvalidArgumentValue |
Invalid parameter value |
InvalidColumnException |
An invalid column of a ResultSet was accessed. |
NotSupportedException |
Certain features are currently not supported by the driver. |
ObjectIsClosedException |
A Connection, Statement or ResultSet was accessed after having been closed. |
InternalJDBCError |
Corrupt internal state of the connection, close the connection. |
com.sap.dbtech.jdbc.translators.ConversionExceptionSapDB
- The conversion between Java and SQL types failed.
Unsupported Features
- New Oracle data types (Array, REF, Struct, Object)
- GetAtoGeneratedKeys
- Blob-/Clob.setXXX()
|
|
|