问题
Oracle DB 使用 Dapper
使用情境如下
1.db.Open()确定开启
2.先塞资料进 temp_1
3.随后select temp_1
4.得到结果0笔????
IEnumerable<dynamic> results = null; db.Open(); string sql = "insert into temp_1 (col_1) values('Test')"; db.Execute(sql); string sql2 = "select * form temp_1"; result = db.Query(sql2);
结果GLOBAL TEMPORARY TABLE
commit 方式被设定为
ON COMMIT DELETE ROWS NOCACHE;
(只要commit就将资料除)
改成 ON COMMIT PRESERVE ROWS
(在同一Sessin期间,资料是保存的)
即可。