External Interfaces > Reality Java Interface > SQL/JDBC Interface to Reality > JDBC Interfaces > RealSQLDriver

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

Reality V15.0 ()

RealSQLDriver (RealSQL-JDBC) (driver.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

RealSQLDriver

The Driver  interface interacts with the DriverManager. A client application should not call the methods in RealSQLDriver  directly, but should call them via the DriverManager  class. (The javadoc for the DriverManager  class can be found at http://java.sun.com/products/jdk/1.2/docs/api/java/sql/DriverManager.html

To establish a connection to a Reality database, an application calls one of the three DriverManager.getConnection()methods, supplying a unique URL in the format:

 jdbc:realsql://host{:port}/database{;key=value,key=value}

Where:

The key=value  pairs are defined as optional, but a connection will not be successful without at least a user-id, user password and account name.

The three getConnection()  methods in DriverManager  provide three alternative ways in which the properties can be supplied. The Connection Examples illustrate the three ways: Method A appends all of the information to the URL; Method B and the full Example Application build a java.util.Properties  object to pass the connection properties; Method C appends the account, account password and a logging property to the URL, then passes the URL, plus separate user and user password identifiers, to getConnection().

The request is packaged and forwarded to the RealSQLDriver.connect()  method. The connection URL is parsed and validated and a new Connection  object is created, at which point the connection to the database is established.

RealityV15.0Comment on this topic