1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00
This commit is contained in:
gnosygnu
2015-04-12 23:12:36 -04:00
parent 18dcd3f89e
commit 551120b906
171 changed files with 3625 additions and 1983 deletions

View File

@@ -26,7 +26,10 @@ public class Db_attach_rdr {
this.diff_db = !String_.Eq(conn_info.Url().Raw(), attach_url.Raw());
}
public Db_rdr Exec_as_rdr(String sql) {
if (diff_db) conn.Env_db_attach(attach_name, attach_url);
try {
if (diff_db) conn.Env_db_attach(attach_name, attach_url);
} catch (Exception e) {Err_.Noop(e); Gfo_usr_dlg_.I.Warn_many("", "", "db:failed to attach db; name=~{0} url=~{1}", attach_name, attach_url.Raw());}
sql = String_.Replace(sql, "<attach_db>", diff_db ? attach_name + "." : ""); // replace <attach> with either "attach_db." or "";
return conn.Exec_sql_as_rdr2(sql);
}
public void Rls() {