欢迎来到天天文库
浏览记录
ID:37860014
大小:41.50 KB
页数:5页
时间:2019-06-01
《jdbc连接字符串》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、JDBC连接字符串大全(2009-06-1307:54:07)转载▼标签:jdbc杂谈分类:Java各种数据库的JDBC连接大全MicrosoftSQLServerseries(6.5,7.xand2000)andSybase10JDBCName:jTDSURL:http://jtds.sourceforge.net/Version:0.5.1DownloadURL:http://sourceforge.net/project/showfiles.php?group_id=33291语法:Class.forName("net.source
2、forge.jtds.jdbc.Driver");Connectioncon=DriverManager.getConnection("jdbc:jtds:sqlserver://host:port/database","user","password");orConnectioncon=DriverManager.getConnection("jdbc:jtds:sybase://host:port/database","user","password");MySQLJDBCName:Connector/J3.0URL:http://w
3、ww.mysql.com/Version:3.0.8-stableDownloadURL:http://www.mysql.com/downloads/api-jdbc-stable.html语法:DownloadURL:http://www.mysql.com/downloads/api-jdbc-stable.html语法:Class.forName("com.mysql.jdbc.Driver");Connectioncon=DriverManager.getConnection("jdbc:mysql://host:port/da
4、tabase","user","password");OracleJDBCName:Connector/J3.0URL:http://otn.oracle.com/Version:3.0.8-stableDownloadURL:http://otn.oracle.com/software/tech/java/sqlj_jdbc/content.html语法:DownloadURL:http://otn.oracle.com/software/tech/java/sqlj_jdbc/content.html语法:Class.forName(
5、"oracle.jdbc.driver.OracleDriver");Connectioncon=DriverManager.getConnection("jdbc:oracle:thin:@host:port:databse","user","password");SybaseDriver:jConnect4.5/5.5(JDBC2.0请使用5.5)语法:Class.forName("com.sybase.jdbc2.jdbc.SybDriver").newInstance();DriverManager.getConnection("
6、jdbc:sybase:Tds:IP地址:2638?ServiceName="+数据库名称,"账号","密码");PostgresqlJDBCName:PostgreSQLJDBCURL:http://jdbc.postgresql.org/Version:7.3.3build110DownloadURL:http://jdbc.postgresql.org/download.html语法:DownloadURL:http://jdbc.postgresql.org/download.html语法:Class.forName("org.p
7、ostgresql.Driver");Connectioncon=DriverManager.getConnection("jdbc:postgresql://host:port/database","user","password");IBMAS400主机在用的JDBC语法有装V4R4以上版本的ClientAccessExpress可以在C:ProgramFilesIBMClientAccessjt400lib找到driver档案jt400.zip,并更改扩展名成为jt400.jar语法语法:Class.forName("net.sou
8、rceforge.jtds.jdbc.Driver");Connectioncon=DriverManager.getConnection("jdbc:jtds:sqlserver://hos
此文档下载收益归作者所有