![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » DBISAM Technical Support » Incident Reports » Incident Reports Addressed for Version 4.38 » View Incident Report |
![]() |
Reported By: Arthur Williams Reported On: 12/8/2013 For: Version 4.37 Build 3 |
procedure TForm3.Button2Click(Sender: TObject); begin simain.ClearLog; DBISAMSession1.Active := True; if memsectors.Exists then begin memsectors.DeleteTable; SiMain.LogVerbose('Deleting local sectors table'); end; with memsectors do begin if not Exists then begin SiMain.LogVerbose('Initializing SECTORS Table'); FieldDefs.Clear; with FieldDefs do begin Add('idxno',ftAutoInc,0,True); Add('name',ftString,40,True); Add('playerid',ftInteger,0,True); Add('locx',ftWord,0,True); Add('locy',ftWord,0,True); Add('specflags',ftWord,0,True); Add('spectype',ftWord,0,True); Add('startype',ftWord,0,True); Add('aniscale',ftWord,0,True); Add('anispeed',ftWord,0,True); Add('objects',ftBlob,0,False); Add('objcount',ftInteger,0,True); Add('obscount',ftInteger,0,True); end; with IndexDefs do begin Clear; Add('','idxno',[ixPrimary,ixUnique]); Add('pkey','playerid',[ixCaseInsensitive]); end; CreateTable; end; Open; end; GenUniverse(memsectors); memsectors.Close; DBISAMSession1.Active := False; end; procedure TForm3.GenUniverse(atable: TDBISAMTable); var i : integer; zstr : string; begin SiMain.LogVerbose('Saving Universe'); SetLength(zstr,32769); for i := 1 to 1000000*15 do begin if (i mod 100000) = 0 then SiMain.LogVerbose('Wrote record #'+IntToStr(i)); atable.Append; atable.FieldByName('idxno').AsInteger := i; atable.FieldByName('name').AsString := 'Starr'+IntToStr(i); atable.FieldByName('playerid').AsInteger := i; atable.FieldByName('locx').AsInteger := 12; atable.FieldByName('locy').AsInteger := 11; atable.FieldByName('specflags').AsInteger := 27; atable.FieldByName('spectype').AsInteger := 35; atable.FieldByName('startype').AsInteger := 22; atable.FieldByName('aniscale').AsInteger := 80; atable.FieldByName('anispeed').AsInteger := 81; atable.FieldByName('objects').AsString := zstr; atable.FieldByName('objcount').AsInteger := 0; atable.FieldByName('obscount').AsInteger := 0; atable.Post; end; SiMain.LogVerbose('Save complete'); end;
This web page was last updated on Wednesday, October 30, 2024 at 11:41 AM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |