当前位置: 技术问答>java相关
哪们英文好,帮忙翻一下,在线等,50分
来源: 互联网 发布时间:2015-07-27
本文导语: 我下了个驱动,JDBC的帮助看不懂 Three steps are required to use the IDS JDBC Driver in a Java program: 1) Composing a Connection URL, 2) Initialize the driver, 3) Making a connection. A typical Connection URL for looks like this: ...
我下了个驱动,JDBC的帮助看不懂
Three steps are required to use the IDS JDBC Driver in a Java program: 1) Composing a Connection URL, 2) Initialize the driver, 3) Making a connection. A typical Connection URL for looks like this:
"jdbc:ids://ip_address:12/conn?dsn='MyDB'&uid='MyName'&pwd='sECreT'"
where ip_address:12 is the address and port number of the IDS Server. The default port number is 12, but it can be changed in the "idss.ini" file. 'MyDB' is the ODBC data source name (or Oracle server alias, see next topic). 'MyName' is the user ID of the target database. 'sECreT' is the password of the database user ID. For a complete reference on the syntax of the Connection URL, please refer to Section 4.4 and 4.5 of the IDS Server User's Guide.
There are several ways to initialize the driver and make a connection. If you like to use the DriverManager.getConnection() method, you can use the following:
Class.forName("ids.sql.IDSDriver").newInstance();
Connection conn = DriverManager.getConnection(url,"scott", "tiger");
******"scott", "tiger"****这两个单词是说什么的举个例子吧好吗?
If you like to use the Driver.connect() method, you can create a JDBC Connection instance like this:
Driver drv = (Driver)
Class.forName("ids.sql.IDSDriver").newInstance();
Connection conn = drv.connect(url, prop);
There is a much simpler alternative looks like the following. The only drawback is that this requires you to include the "IDS_Server_directoryclasses" directory in the CLASSPATH environment before compiling.
Driver drv = new ids.sql.IDSDriver();
Connection conn = drv.connect(url, prop);//prop什么意思?
Using java2.sql.IDSDriver
This driver is for applets using JDBC 2.1 features runing in Version 4 browsers. When writing applets using this driver, first import the java2.sql.* package instead of java.sql.*. Then initialize the driver class java2.sql.IDSDriver instead of ids.sql.IDSDriver. The syntax of the Connection URL remains the same. For example,
import java2.sql.*; // Instead of import java.sql.*;
...
Driver drv = new java2.sql.IDSDriver();
Connection conn = drv.connect(url, prop);
You must add archive "IDS_Serverclassesjdk12drv-v4browsers.zip" to the CLASSPATH environment variable before compiling your applet.
Using j102.sql.IDSDriver
This driver is for applets using JDBC 2.1 features runing in Version 3 browsers. When writing applets using this driver, first import the j102.sql.* package instead of java.sql.*. Then initialize the driver class j102.sql.IDSDriver instead of ids.sql.IDSDriver. The syntax of the Connection URL remains the same. For example,
import j102.sql.*; // Instead of import java.sql.*;
...
Driver drv = new j102.sql.IDSDriver();
Connection conn = drv.connect(url, prop);
You must add archive "IDS_Serverclassesjdk12drv-v3browsers.zip" to the CLASSPATH environment variable before compiling your applet.
Three steps are required to use the IDS JDBC Driver in a Java program: 1) Composing a Connection URL, 2) Initialize the driver, 3) Making a connection. A typical Connection URL for looks like this:
"jdbc:ids://ip_address:12/conn?dsn='MyDB'&uid='MyName'&pwd='sECreT'"
where ip_address:12 is the address and port number of the IDS Server. The default port number is 12, but it can be changed in the "idss.ini" file. 'MyDB' is the ODBC data source name (or Oracle server alias, see next topic). 'MyName' is the user ID of the target database. 'sECreT' is the password of the database user ID. For a complete reference on the syntax of the Connection URL, please refer to Section 4.4 and 4.5 of the IDS Server User's Guide.
There are several ways to initialize the driver and make a connection. If you like to use the DriverManager.getConnection() method, you can use the following:
Class.forName("ids.sql.IDSDriver").newInstance();
Connection conn = DriverManager.getConnection(url,"scott", "tiger");
******"scott", "tiger"****这两个单词是说什么的举个例子吧好吗?
If you like to use the Driver.connect() method, you can create a JDBC Connection instance like this:
Driver drv = (Driver)
Class.forName("ids.sql.IDSDriver").newInstance();
Connection conn = drv.connect(url, prop);
There is a much simpler alternative looks like the following. The only drawback is that this requires you to include the "IDS_Server_directoryclasses" directory in the CLASSPATH environment before compiling.
Driver drv = new ids.sql.IDSDriver();
Connection conn = drv.connect(url, prop);//prop什么意思?
Using java2.sql.IDSDriver
This driver is for applets using JDBC 2.1 features runing in Version 4 browsers. When writing applets using this driver, first import the java2.sql.* package instead of java.sql.*. Then initialize the driver class java2.sql.IDSDriver instead of ids.sql.IDSDriver. The syntax of the Connection URL remains the same. For example,
import java2.sql.*; // Instead of import java.sql.*;
...
Driver drv = new java2.sql.IDSDriver();
Connection conn = drv.connect(url, prop);
You must add archive "IDS_Serverclassesjdk12drv-v4browsers.zip" to the CLASSPATH environment variable before compiling your applet.
Using j102.sql.IDSDriver
This driver is for applets using JDBC 2.1 features runing in Version 3 browsers. When writing applets using this driver, first import the j102.sql.* package instead of java.sql.*. Then initialize the driver class j102.sql.IDSDriver instead of ids.sql.IDSDriver. The syntax of the Connection URL remains the same. For example,
import j102.sql.*; // Instead of import java.sql.*;
...
Driver drv = new j102.sql.IDSDriver();
Connection conn = drv.connect(url, prop);
You must add archive "IDS_Serverclassesjdk12drv-v3browsers.zip" to the CLASSPATH environment variable before compiling your applet.
|
oral是服务名
|
Connection conn = DriverManager.getConnection(url,"scott", "tiger");
******"scott", "tiger"****这两个单词是说什么的举个例子吧好吗?
scott数据库用户名,tiger是密码
prop是一个参数,包含了连接数据库的一些信息
******"scott", "tiger"****这两个单词是说什么的举个例子吧好吗?
scott数据库用户名,tiger是密码
prop是一个参数,包含了连接数据库的一些信息