| private { Private declarations } procedure InsertComb(cc : integer); procedure InsertComb2(cc : integer); procedure InsertGuid(cc : integer); procedure insertInt(cc : integer); public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); var TotalTime : Cardinal; cc : integer; begin cc:= strtoint(Edit1.Text); TotalTime := GetTickCount; insertInt(cc); TotalTime := GetTickCount - TotalTime; Label3.Caption := inttostr(TotalTime); TotalTime := GetTickCount; InsertGuid(cc); TotalTime := GetTickCount - TotalTime; Label5.Caption := inttostr(TotalTime); TotalTime := GetTickCount; InsertComb(cc); TotalTime := GetTickCount - TotalTime; Label7.Caption := inttostr(TotalTime); TotalTime := GetTickCount; InsertComb2(cc); TotalTime := GetTickCount - TotalTime; Label9.Caption := inttostr(TotalTime); end; procedure TForm1.InsertComb(cc : integer); var i : integer; begin ADOCommand1.CommandText :=''''Insert into TComb(PComb,NInt) values(:PComb,:NInt)''''; ADOCommand1.Prepared := true; For i:= 0 to cc-1 do begin ADOCommand1.Parameters[0].Value := SSystem.GetGuidString(SSystem.GetCombGUID(),'''''''','''''''',''''''''); ADOCommand1.Parameters[1].Value := i/7; ADOCommand1.Execute; end; end; procedure TForm1.InsertComb2(cc: integer); var i : integer; //combStr : string; begin ADOCommand1.CommandText :=''''Insert into TComb2(PComb,NInt) values(:PComb,:NInt)''''; ADOCommand1.Prepared := true; For i:= 0 to cc-1 d 上一页 [1] [2] [3] [4] 下一页 |