uses adodb;
procedure TForm1.Button1Click(Sender: TObject);
var ASystemTime :_SYSTEMTIME;
begin
with TADOQuery.Create(nil) do
try
ConnectionString:='Provider=SQLOLEDB.1;Password=kcsoft58;'
+'Persist Security Info=True;User ID=sa;Data Source=CHEN ';
sql.text:='select getdate()';
open;
DateTimeToSystemTime(Fields.Fields[0].AsDateTime,ASystemTime);
SetSystemTime(ASystemTime);
finally
free;
end;
end;