CodePudding user response:
Procedure TForm1. Button1Click (Sender: TObject);The begin
//create ODBC DSN SQL Server data source
If the trim (edit1. Text) & lt;> "' then
The begin
If CreateSQLServerDsn (trim (Edit1. Text), trim (Edit2. Text), trim (edit7. Text), trim (Edit3. Text)) then
The begin
Showmessage (' ODBC to create success! ');
End the else
The begin
Showmessage (' ODBC create failure! ');
end;
End
end;
May refer to
CodePudding user response: