postgreSQL jdbc

前端之家收集整理的这篇文章主要介绍了postgreSQL jdbc前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1. MysqL(http://www.mysql.com)mm.mysql-2.0.2-bin.jar
Class.forName( "org.gjt.mm.MysqL.Driver" );
cn = DriverManager.getConnection( "jdbc:MysqL://MyDbComputerNameOrIP:3306/myDatabaseName",sUsr,sPwd );

2. Postgresql(http://www.de.postgresql.org)pgjdbc2.jar
Class.forName( "org.postgresql.Driver" );
cn = DriverManager.getConnection( "jdbc:postgresql://MyDbComputerNameOrIP/myDatabaseName",255)"> 3.Oracle(http://www.oracle.com/ip/deploy/database/oracle9i/)classes12.zip
Class.forName( "oracle.jdbc.driver.OracleDriver" );
cn = DriverManager.getConnection( "jdbc:oracle:thin:@MyDbComputerNameOrIP:1521:ORCL",255)"> 4.Sybase(http://jtds.sourceforge.net)jconn2.jar
Class.forName( "com.sybase.jdbc2.jdbc.SybDriver" );
cn = DriverManager.getConnection( "jdbc:sybase:Tds:MyDbComputerNameOrIP:2638",sPwd );
//(Default-Username/Password: "dba"/"sql")

5.Microsoft sqlServer(http://jtds.sourceforge.net)
Class.forName( "net.sourceforge.jtds.jdbc.Driver" );
cn = DriverManager.getConnection( "jdbc:jtds:sqlserver://MyDbComputerNameOrIP:1433/master",255)"> 6.Microsoft sqlServer(http://www.microsoft.com)
Class.forName( "com.microsoft.jdbc.sqlserver.sqlServerDriver" );
cn = DriverManager.getConnection( "jdbc:microsoft:sqlserver://MyDbComputerNameOrIP:1433;databaseName=master",255)"> 7.ODBC
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
Connection cn = DriverManager.getConnection( "jdbc:odbc:" + sDsn,255)"> 8.DB2
Class.forName("com.ibm.db2.jdbc.net.DB2Driver");
String url="jdbc:db2://192.9.200.108:6789/SAMPLE"
cn = DriverManager.getConnection( url,255)"> 9.Microsoft sql Server series (6.5,7.x and 2000) and Sybase 10
commet
JDBC Name: jTDS
URL:http://jtds.sourceforge.net/
Version: 0.5.1
Download URL:http://sourceforge.net/project/showfiles.php?group_id=33291

语法:
Class.forName("net.sourceforge.jtds.jdbc.Driver ");
Connection con = DriverManager.getConnection("jdbc:jtds:sqlserver://host:port/database","user","password");
or
Connection con = DriverManager.getConnection("jdbc:jtds:sybase://host:port/database","password");

10.Postgresql
JDBC Name: Postgresql JDBC
URL:http://jdbc.postgresql.org/
Version: 7.3.3 build 110
Download URL:http://jdbc.postgresql.org/download.html
语法:
Class.forName("org.postgresql.Driver");
Connection con=DriverManager.getConnection("jdbc:postgresql://host:port/database",255)"> 11.IBM AS400主机在用的JDBC语法 有装V4R4以上版本的Client Access Express 可以在C:\Program Files\IBM\Client Access\jt400\lib

原文链接:https://www.f2er.com/postgresql/196329.html

猜你在找的Postgre SQL相关文章