Answered _Connect - which db??

rzr

Member
Does _Connect show the details of the first connected database?
If I have multiple Db's - how do I know which Db's info does the _Connect display.
 

RealHeavyDude

Well-Known Member
Might be wrong but I think the LDBNAME(n) and PDBNAME(n) are built up in the order you connect the databases.

Usually the DICTDB also points to the first connected database.

Heavy Regards, RealHeavyDude.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
Correct RHD. If not fully qualified, system tables (including VSTs) return data from the database with the DICTDB alias. By default it will be the first connected database.

You can show which DB it is with "display ldbname("dictdb")". If you want data from multiple DBs you can do this by iterating over your connected DBs and changing the DICTDB alias. Note that you can't set and reference the alias within the same procedure. See this thread for an example.

As Stefan noted in that thread you can do it in a single procedure if you're comfortable with dynamic queries.
 
Top