????JDBC????????????????
???????????? ???????[ 2014/4/18 9:25:14 ] ????????????? ????
MySQL??
String Driver="com.mysql.jdbc.Driver"; //????????
String URL="jdbc:mysql://localhost:3306/db_name"?useUnicode=true&characterEncoding=UTF-8; //?????URL??db_name???????????????????????
String Username="username"; //?????
String Password="password"; //????
Class.forName(Driver).new Instance();
Connection con=DriverManager.getConnection(URL??Username??Password);
JTDS2.0??
String Driver=" net.sourceforge.jtds.jdbc.Driver"; //????????
String URL="jdbc:jtds:sqlserver://localhost:1433/db_name";
String Username="username"; //?????
String Password="password"; //????
Class.forName(Driver).new Instance();
Connection con=DriverManager.getConnection(URL??Username??Password);
Microsoft SQL Server 2.0????(3??jar?????):
String Driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"; //????SQL?????????
String URL="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=db_name"; //db_name????????
String Username="username"; //?????
String Password="password"; //????
Class.forName(Driver).new Instance(); //?????????????
Connection con=DriverManager.getConnection(URL??UserName??Password); //
Microsoft SQL Server 3.0????(1??jar?????):
String Driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"; //????SQL?????????
String URL="jdbc:sqlserver://localhost:1433;DatabaseName=db_name"; //db_name????????
String Username="username"; //?????
String Password="password"; //????
Class.forName(Driver).new Instance(); //?????????????
Connection con=DriverManager.getConnection(URL??UserName??Password); //
Sysbase:
String Driver="com.sybase.jdbc.SybDriver"; //????????
String URL="jdbc:Sysbase://localhost:5007/db_name"; //db_name????????
String Username="username"; //?????
String Password="password"; //????
Class.forName(Driver).newInstance();
Connection con=DriverManager.getConnection(URL??Username??Password);
Oracle(??thin??):
String Driver="oracle.jdbc.driver.OracleDriver"; //?????????????
String URL="jdbc:oracle:thin:@loaclhost:1521:orcl"; //orcl???????SID
String Username="username"; //?????
String Password="password"; //????
Class.forName(Driver).newInstance(); //?????????????
Connection con=DriverManager.getConnection(URL??Username??Password);
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11