![]() | Products |
| Home » Technical Support » ElevateDB Technical Support » Product Manuals » ElevateDB Version 2 Manual for RAD Studio XE (Delphi) » Using ElevateDB » Opening Tables and Views |
begin
with MyDatabase do
begin
DatabaseName:='AccountingDB';
Database:='Accounting';
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:='Accounting';
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';
Database:='Accounting';
Connected:=True;
end;
with MyTable do
begin
SessionName:='Remote';
{ We're using a database component for the source
database, so we use the same value as the DatabaseName
property for the TEDBDatabase component above, not
the same value as the Database property, which
is the name of the actual database }
DatabaseName:='AccountingData';
TableName:='ledger';
Exclusive:=True;
ReadOnly:=False;
try
Open;
except
on E: Exception do
begin
if (E is EDatabaseError) and
(E is EEDBError) then
begin
if (EEDBError(E).ErrorCode=EDB_ERROR_LOCK) then
ShowMessage('Cannot open table '+TableName+
', another user has the table '+
'open already')
else
ShowMessage('Unknown or unexpected database '+
'engine error # '+
IntToStr(EEDBError(E).ErrorCode));
end
else
ShowMessage('Unknown or unexpected error has occurred');
end;
end;
end;
end;This web page was last updated on Tuesday, September 16, 2025 at 04:56 PM | Privacy Policy © 2026 Elevate Software, Inc. All Rights Reserved Questions or comments ? |

