![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » DBISAM Technical Support » Product Manuals » DBISAM Version 4 Manual for RAD Studio XE4 (C++ Win64) » Using DBISAM » Opening Tables |
{ MyDatabase->DatabaseName="AccountingDB"; MyDatabase->Directory="c:\\acctdata"; MyDatabase->Connected=true; MyTable->DatabaseName="AccountingDB"; MyTable->TableName="ledger"; MyTable->Active=true; }
{ MySession->SessionName="Remote"; MySession->SessionType=stRemote; MySession->RemoteAddress="192.168.0.2"; MySession->Active=true; MyTable->SessionName="Remote"; MyTable->DatabaseName="AccountingDB"; MyTable->TableName="ledger"; MyTable->Active=true; }
{ { MySession->SessionName="Remote"; MySession->SessionType=stRemote; MySession->RemoteAddress="192.168.0.2"; MySession->Active=true; MyDatabase->SessionName="Remote"; MyDatabase->DatabaseName="AccountingData"; MyDatabase->RemoteDatabase="AccountingDB"; MyDatabase->Connected=True; MyTable->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 MyTable->DatabaseName="AccountingData"; MyTable->TableName="ledger"; MyTable->Exclusive=true; MyTable->ReadOnly=False; try { MyTable->Open(); } catch(const Exception &E) { if (dynamic_cast<EDatabaseError*>(E) & dynamic_cast<EDBISAMEngineError*>(E)) { if (dynamic_cast<EDBISAMEngineError&>(*E)->ErrorCode== DBISAM_OSEACCES) { ShowMessage("Cannot open table "+MyTable->TableName+ ", another user has the table open already"); } else { ShowMessage("Unknown or unexpected "+ "database engine error # +IntToStr( dynamic_cast<EDBISAMEngineError&>(*E)->ErrorCode)); } } else { ShowMessage("Unknown or unexpected "+ "error has occurred"); } } } }
This web page was last updated on Thursday, November 16, 2023 at 10:39 AM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |