刘韬 2 years ago
parent
commit
adf77665ec
1 changed files with 14 additions and 0 deletions
  1. 14 0
      DataFusion/src/com/zskk/control/ViewController.java

+ 14 - 0
DataFusion/src/com/zskk/control/ViewController.java

@@ -40,6 +40,20 @@ public class ViewController extends Controller {
 		}
 		
 	}
+	
+	/**
+	 * 在被连接数据库执行sql语句
+	 */
+	public void executeSqlPrint() {
+		try {
+			List<Record> d = Db.use("print").find(this.getPara("sqlstr"));
+			this.renderJson(d);
+		} catch (Exception e) {
+			// TODO: handle exception
+			this.renderText(e.toString());
+		}
+		
+	}
 
 	public void testConn() {
 		try {