Commit 76a9587e authored by Quxl's avatar Quxl

x

parent 64ddb343
...@@ -54,11 +54,11 @@ public class SqlTestController { ...@@ -54,11 +54,11 @@ public class SqlTestController {
String driverClass = null; String driverClass = null;
if(jdbcUrl.toLowerCase().contains("jtds")) { if(jdbcUrl.toLowerCase().contains("jtds")) {
driverClass = "net.sourceforge.jtds.jdbc.Driver"; driverClass = "net.sourceforge.jtds.jdbc.Driver";
} else if(jdbcUrl.contains("mysql")) { } else if(jdbcUrl.toLowerCase().contains("mysql")) {
driverClass = "com.mysql.jdbc.Driver"; driverClass = "com.mysql.jdbc.Driver";
} else if(jdbcUrl.contains("sqlserver")) { } else if(jdbcUrl.toLowerCase().contains("sqlserver")) {
driverClass = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; driverClass = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
} else if(jdbcUrl.contains("sybase")) { } else if(jdbcUrl.toLowerCase().contains("sybase")) {
driverClass = "com.sybase.jdbc4.jdbc.SybDriver"; driverClass = "com.sybase.jdbc4.jdbc.SybDriver";
} else { } else {
throw new XRException("URL无法识别, 没有对应的驱动程序"); throw new XRException("URL无法识别, 没有对应的驱动程序");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment