当前位置: 技术问答>java相关
大侠请进!如何设置才能用DataSource呢?
来源: 互联网 发布时间:2015-04-07
本文导语: 环境:J2SDKee1.3.1 J2SDK1.4.0 MS SQL Server 7.0 MS SQL Driver for JDBC Beta 2 http://www.microsoft.com/sql/downloads/2000/jdbc.asp 请问如何设置呢? Deploytool 不会用!! | 1. download and install ...
环境:J2SDKee1.3.1
J2SDK1.4.0
MS SQL Server 7.0
MS SQL Driver for JDBC Beta 2
http://www.microsoft.com/sql/downloads/2000/jdbc.asp
请问如何设置呢?
Deploytool 不会用!!
J2SDK1.4.0
MS SQL Server 7.0
MS SQL Driver for JDBC Beta 2
http://www.microsoft.com/sql/downloads/2000/jdbc.asp
请问如何设置呢?
Deploytool 不会用!!
|
1. download and install the SQL Server 2000 Driver for JDBC BETA 2 from
http://www.microsoft.com/sql/downloads/2000/jdbc.asp
2. add the three jar files onto the CLASSPATH environment variable, for example:
CLASSPATH=C:Program FilesMicrosoft SQL Server 2000 driver for
JDBClibmsbase.jar;C:Program FilesMicrosoft SQL Server 2000 driver for JDBClibmssqlserver.jar;C:Program FilesMicrosoft SQL Server 2000 driver for JDBClibmsutil.jar;
3. start J2EE in a DOS window:
C:>J2EE -verbose
4. start deploytool in another DOS window:
C:>deploytool
5. In the Tools Menu select Server Configuration
6. In the DataSources (Standard) page, add the name of the driver:
com.microsoft.jdbc.sqlserver.SQLServerDriver
7. add a datasource name, for example:
jdbc/sqlserver
8. addthe JDBC URL for your newly added datasource, for example:
jdbc:microsoft:sqlserver://YourServerName:1433;DatabaseName=YourDatabaseName;User=YourUserID;Password=YourPassword
(Change YourServerName, YourDatabaseName, YourUserID, YourPassword to your own information)
by the way, if you assign a blank password, the driver may fail, it is a known bug
http://www.microsoft.com/sql/downloads/2000/jdbc.asp
2. add the three jar files onto the CLASSPATH environment variable, for example:
CLASSPATH=C:Program FilesMicrosoft SQL Server 2000 driver for
JDBClibmsbase.jar;C:Program FilesMicrosoft SQL Server 2000 driver for JDBClibmssqlserver.jar;C:Program FilesMicrosoft SQL Server 2000 driver for JDBClibmsutil.jar;
3. start J2EE in a DOS window:
C:>J2EE -verbose
4. start deploytool in another DOS window:
C:>deploytool
5. In the Tools Menu select Server Configuration
6. In the DataSources (Standard) page, add the name of the driver:
com.microsoft.jdbc.sqlserver.SQLServerDriver
7. add a datasource name, for example:
jdbc/sqlserver
8. addthe JDBC URL for your newly added datasource, for example:
jdbc:microsoft:sqlserver://YourServerName:1433;DatabaseName=YourDatabaseName;User=YourUserID;Password=YourPassword
(Change YourServerName, YourDatabaseName, YourUserID, YourPassword to your own information)
by the way, if you assign a blank password, the driver may fail, it is a known bug