提交 fa6bf4d3 编写于 作者: Z zyyang

change

上级 92a7bd46
...@@ -16,7 +16,7 @@ public class JDBCDemo { ...@@ -16,7 +16,7 @@ public class JDBCDemo {
host = args[++i]; host = args[++i];
if ("-driverType".equalsIgnoreCase(args[i]) && i < args.length - 1) { if ("-driverType".equalsIgnoreCase(args[i]) && i < args.length - 1) {
driverType = args[++i]; driverType = args[++i];
if (!"jni".equalsIgnoreCase(driverType) || !"restful".equalsIgnoreCase(driverType)) if (!"jni".equalsIgnoreCase(driverType) && !"restful".equalsIgnoreCase(driverType))
printHelp(); printHelp();
} }
} }
...@@ -40,10 +40,10 @@ public class JDBCDemo { ...@@ -40,10 +40,10 @@ public class JDBCDemo {
private void init() { private void init() {
// get connection // get connection
try { try {
if (driverType.equals("jni")) { if (driverType.equals("restful")) {
Class.forName("com.taosdata.jdbc.TSDBDriver");
} else {
Class.forName("com.taosdata.jdbc.rs.RestfulDriver"); Class.forName("com.taosdata.jdbc.rs.RestfulDriver");
} else {
Class.forName("com.taosdata.jdbc.TSDBDriver");
} }
Properties properties = new Properties(); Properties properties = new Properties();
properties.setProperty("host", host); properties.setProperty("host", host);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册