javaweb开发各种数据库连接方式表(JavaWeb development of various database connection table).doc

javaweb开发各种数据库连接方式表(JavaWeb development of various database connection table).doc

  1. 1、本文档共12页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
javaweb开发各种数据库连接方式表(JavaWeb development of various database connection table)

javaweb开发各种数据库连接方式表(JavaWeb development of various database connection table) Java to connect a variety of database development in Web mode chart Overview: article from the network, is divided into three parts: Part one: lists the ways in which various databases use JDBC connections. The second part gives a detailed introduction to the way JDBC connects to MySql. The third part introduces some of the techniques you can use to connect to an Oracle database using JDBC The article is long, I hope the reader can patiently read... The following is the text ******************************** ***************************** One way to connect a variety of database lookup tables Heres a list of the ways all databases use JDBC connections, which can be used as a manual. 1, Oracle8/8i/9i database (thin mode) Class.forName (oracle.jdbc.driver.OracleDriver).NewInstance (); String url= jdbc:oracle:thin:@localhost:1521:orcl; //orcl is the SID of the database String user= test; String password= test; Connection, conn=, DriverManager.getConnection (URL, user, password); 2, DB2 database Class.forName (com.ibm.db2.jdbc.app.DB2Driver).NewInstance (); String url= jdbc:db2://localhost:5000/sample; //sample is your database name String user= admin; String password=; Connection, conn=, DriverManager.getConnection (URL, user, password); 3, Sql Server7.0/2000 database Class.forName (com.microsoft.jdbc.sqlserver.SQLServerDriver).NewInstance (); String url= jdbc:microsoft:sqlserver://localhost:1433; DatabaseName=mydb; //mydb as database String user= SA; String password=; Connection, conn=, DriverManager.getConnection (URL, user, password); 4, Sybase database Class.forName (com.sybase.jdbc.SybDriver).NewInstance (); String url = jdbc:sybase:Tds:localhost:5007/myDB; //myDB is your database name Properties sysProps = System.getProperties (); SysProps.put (user, userid); SysProps.put (password, user_password); Connection, conn=, DriverManager.getConnection (URL, SysProps); 5, Informix database Class.

文档评论(0)

f8r9t5c + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8000054077000003

1亿VIP精品文档

相关文档