private void SetQueryBuilderConnection() { IQueryBuilder theQBuilder = (IQueryBuilder)ObjectFactory.CreateInstance("BusinessProcess.FormBuilder.BQueryBuilder, BusinessProcess.FormBuilder"); SqlConnection theConnection = theQBuilder.GetConnectionQueryBuilder(); mssqlMetadataProvider1.Connection = theConnection; QBControl.MetadataProvider = mssqlMetadataProvider1; QBControl.SyntaxProvider = universalSyntaxProvider1; plainTextSQLBuilder1.QueryBuilder = QBControl; QBControl.RefreshMetadata(); }
private void frmQueryBuilder_Load(object sender, EventArgs e) { try { Init_Form(); clsCssStyle theStyle = new clsCssStyle(); theStyle.setStyle(this); SetQueryBuilderConnection(); QBControl.RefreshMetadata(); } catch (Exception err) { MsgBuilder Builder = new MsgBuilder(); Builder.DataElements["MessageText"] = err.Message.ToString(); IQCareWindowMsgBox.ShowWindow("#C1", Builder, this); } }