- 1、本文档共12页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 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.
您可能关注的文档
- coreldraw题库(coreldraw题库).doc
- 图表统计在应用问题教学中的尝试(The attempt of chart statistics in the teaching of applied problems).doc
- 图解系列(Graphic series).doc
- 圆的面积---邱子珍(The area of the circle --- Qiu Zizhen).doc
- 土壤污染(soil pollution).doc
- 土建施工员应该知道的数据(The data that the builder should know).doc
- 土建管理(Civil Engineering Management).doc
- 土楼(Tulou).doc
- 土豆的营养价值(The nutritional value of potatoes).doc
- 圣典(Canon).doc
最近下载
- 精品解析:2023-2024学年浙江省温州市乐清市统编版六年级上册期末考试语文试卷(解析版).docx VIP
- 浙江省温州市乐清市2023-2024学年三年级上学期语文期末试卷 解析版.docx VIP
- 研讨会(一):战略设计的思维、方法与实践 30Aug2011 LY-BEI-C.pptx VIP
- 彩云追月完整版本.ppt VIP
- 2023年济宁医学院临床医学专业《病理学》科目期末考试卷B.docx VIP
- 《环境监测技术》课程标准.doc VIP
- 浙江省温州市龙湾区2023-2024学年四年级上学期语文期末试卷 解析版.docx VIP
- 东瑞制药搬迁项目环评报告(全本公示版).pdf
- 24DX002-1建筑电气与智能化通用规范图示.pdf VIP
- 五年级语文上册课外必读书《非洲民间故事》练习题及答案全.pdf VIP
文档评论(0)