DbAccess Table FbNameLookup

From LSDevLinux
Jump to: navigation, search

Table FbNameLookup

Table FbNameLookup ( logical VARCHAR(255), physical VARCHAR(255) )

exists in master.fdb (which should be created automaticaly by DbAdmin if it doesn't exist)

Writes:

DbAdmin::AttachDatabase(BSTR bstrDatabaseName, BSTR bstrPathName) DbAdmin::DetachDatabase(BSTR bstrDatabaseName)

Each time Attach Database is called FbNameLookup inserts a row into FbNameLookup, where bstrDatabaseName = logical field and bstrPathName = physical field. Both the logical and physical text fields should be unique.

Each time Detach is called a row is removed from FbNameLookup where bstrDatabaseName = logical field.

Reads:

OleDbEncap::Init(BSTR bstrServer, BSTR bstrDatabase, IStream* pfistLog, OdeLockTimeoutMode olt, int nmsTimeout)

When Init is call bStrDatabase is searched for in FbNameLookup logical field, if found the corosponsing physical field replaces the bstrDatabase as the name of the database. IE. which physical database is actually opened by the firebird client lib.