示例:
DBGrid1.DataSource := nil; //用来清空
DBGrid1.DataSource := DataSource1; //要来指定数据源 
—————————————————————————————————
MaximStr := '宠辱不惊,看庭前花开花落,去留无意;
             毁誉由人,望天上云卷云舒,聚散任风。';
if Not Assigned(I) then
  I := TI.Create(Nil);
I.Maxim := MaximStr;
I.Explain := '假如上述代码中出现“OA”等字样,删除它们';
I.Desire := '加不加分随你';
—————————————————————————————————
       

解决方案 »

  1.   

    首先,在 uses 语句中包含进 AdoConEd 单元。然后在应用程序需要触发 ADO 连接串编辑器的地方写入如下简单代码。问题迎刃而解。    ADOConnection1.Close;   // calling EditConnectionString displays the dialog, and   // sets the ConnectString property to the resulting value.   if EditConnectionString(ADOConnection1) then begin   //display the resulting ADO Connect String, just for fun.   label11.caption := ADOConnection1.ConnectionString;   end;