使用AdoConEd 单元,步骤如下:
在 uses 语句中包含进 AdoConEd 单元。然后在应用程序需要触发 ADO 连接串编辑器的地方写入如下简单代码。
procedure TForm1.Button1Click(Sender: TObject);
begin
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;
end;
在 uses 语句中包含进 AdoConEd 单元。然后在应用程序需要触发 ADO 连接串编辑器的地方写入如下简单代码。
procedure TForm1.Button1Click(Sender: TObject);
begin
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;
end;