private void DoOpenWindow() { OpenQueryParameters pars = new OpenQueryParameters(); pars.GeneratingSql = true; var appobj = ContainerInfo.RelatedObject; IPhysicalConnection newconn = null; if (ContainerInfo.RelatedConnection != null) { newconn = ContainerInfo.RelatedConnection.CreateConnection(); } if (newconn != null && ContainerInfo.RelatedDatabase != null) { newconn.SetOnOpenDatabase(ContainerInfo.RelatedDatabase); } pars.GeneratingSql = true; m_frame = new QueryFrame(newconn, pars); MainWindow.Instance.OpenContent(m_frame); MainWindow.Instance.Window.BringToFront(); if (!m_shownGenereratedSql) { m_frame.GenerateSqlFinished(m_sqltext); m_shownGenereratedSql = true; } }
public static void SetOnOpenDatabase(this IPhysicalConnection conn, ObjectPath objpath) { if (objpath != null) { conn.SetOnOpenDatabase(objpath.DbName); } }
public IPhysicalConnection CloneConnection() { IPhysicalConnection conn = m_conn.Clone(); conn.SetOnOpenDatabase(m_dbname); return(conn); }