Before attempting to access data sources directly, ensure you have the Sun JDBC 2.0 Standard Extension packages installed.
Perform the following steps to directly connect to a data source:
- Include an import statement in an application to import the NvDataSource class, as follows:
import com.attunity.jdbc.NvDataSource;- Specify the following in order to define a data source object: NvDataSource ds = new NvDataSource();
were ds is the name of the data source object.- Specify the methods for the data source object, using the following syntax:
ds.method- Where ds is the name of the data source object, as specified in the previous step. For example, the following specifies the server and port for a connection:
ds.setServerName("osf.acme.com");
ds.setPortNumber(8888);
Note: The methods available for the data source object are described in JDBC API Conformance.- Connect to AIS using the following syntax:
Connection con = ds.getConnection();
were con is the connection instance.


LinkBack URL
About LinkBacks




Reply With Quote