Exemplo n.º 1
0
        private void OpenDataLinkDialog(string connection, dbDriver driver, string caption)
        {
            DataLinksClass dl = new MSDASC.DataLinksClass();

            ADODB.Connection conn = new ADODB.ConnectionClass();
            conn.ConnectionString = connection;

            object objCn = (object)conn;

            //	dl.PromptNew();
            if (dl.PromptEdit(ref objCn))
            {
                this.Text = "MyMeta Browser " + caption;

                string error = "";
                try
                {
                    myMeta = new dbRoot();
                    myMeta.Connect(driver, conn.ConnectionString);
                }
                catch (Exception ex)
                {
                    error = ex.Message;
                }

                this.InitializeTree(myMeta, error);
            }
        }
Exemplo n.º 2
0
		private void OpenDataLinkDialog(string connection, dbDriver driver, string caption)
		{
			DataLinksClass dl = new MSDASC.DataLinksClass();

			ADODB.Connection conn = new ADODB.ConnectionClass();
			conn.ConnectionString = connection;

			object objCn = (object) conn;

			//	dl.PromptNew();
			if(dl.PromptEdit(ref objCn))
			{				
				this.Text = "MyMeta Browser " + caption;

				string error = "";
				try
				{
					myMeta = new dbRoot();
					myMeta.Connect(driver, conn.ConnectionString);
				}
				catch(Exception ex)
				{
					error = ex.Message;
				}

				this.InitializeTree(myMeta, error);
			}
		}