![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » DBISAM Technical Support » Product Manuals » DBISAM Version 4 Manual for RAD Studio XE (Delphi) » Using DBISAM » Opening Tables |
begin with MyDatabase do begin DatabaseName:='AccountingDB'; Directory:='c:\acctdata'; Connected:=True; end; with MyTable do begin DatabaseName:='AccountingDB'; TableName:='ledger'; Active:=True; end; end;
begin with MySession do begin SessionName:='Remote'; SessionType:=stRemote; RemoteAddress:='192.168.0.2'; Active:=True; end; with MyTable do begin SessionName:='Remote'; DatabaseName:='AccountingDB'; TableName:='ledger'; Active:=True; end; end;
begin with MySession do begin SessionName:='Remote'; SessionType:=stRemote; RemoteAddress:='192.168.0.2'; Active:=True; end; with MyDatabase do begin SessionName:='Remote'; DatabaseName:='AccountingData'; RemoteDatabase:='AccountingDB'; Connected:=True; end; with MyTable do begin SessionName:='Remote'; { We're using a database component for the database location, so we use the same value as the DatabaseName property for the TDBISAMDatabase component above, not the same value as the RemoteDatabase property, which is the name of the database as defined on the DBISAM database server } DatabaseName:='AccountingData'; TableName:='ledger'; Exclusive:=True; ReadOnly:=False; try Open; except on E: Exception do begin if (E is EDatabaseError) and (E is EDBISAMEngineError) then begin if (EDBISAMEngineError(E).ErrorCode= DBISAM_OSEACCES) then ShowMessage('Cannot open table '+TableName+ ', another user has the table '+ 'open already') else ShowMessage('Unknown or unexpected database '+ 'engine error # '+ IntToStr(EDBISAMEngineError(E).ErrorCode)); end else ShowMessage('Unknown or unexpected error has occurred'); end; end; end; end;
This web page was last updated on Friday, January 20, 2023 at 07:13 AM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |