This question is locked. New answers and comments are not allowed.
Hi,
I'm trying to do reverse mapping from 2 databases (let's name them: DB1 and DB2). DB1 is my default database (written in the .config file in the "connections" section). I've started the reveres mapping dialog, used the "Options" button and then - "Databases" button. I've checked required databases (no name for DB1 (as it is the default db) and DB2 for DB2) and accepted the dialog. Finally I've tried to merge schemas; but this time I've got a message:
Unable to change database: 'USE [DB2]' failed.
Both databases are configured identically. If I put DB2 as a primary database the reverse mapping dialog connects with it without any problem - but reports this time: Unable to change database: 'USE [DB1]' failed.
What should I do?
And by the way, another question concerning multiple databases:
- DB1 has TB1 table with 2 columns: TB1_id (obvious) and TB1_name
- DB2 has TB2 table with TB2_FK column that contains foreign keys to DB1.TB1
If I get a tb2 object (that is a record from TB2) - can I read tb2.TB2_FK.TB1_name? Can I execute a query like this:
select * from TB2Extent where TB2_FK.TB1_name = 'xxx'
Regards
Tomasz
I'm trying to do reverse mapping from 2 databases (let's name them: DB1 and DB2). DB1 is my default database (written in the .config file in the "connections" section). I've started the reveres mapping dialog, used the "Options" button and then - "Databases" button. I've checked required databases (no name for DB1 (as it is the default db) and DB2 for DB2) and accepted the dialog. Finally I've tried to merge schemas; but this time I've got a message:
Unable to change database: 'USE [DB2]' failed.
Both databases are configured identically. If I put DB2 as a primary database the reverse mapping dialog connects with it without any problem - but reports this time: Unable to change database: 'USE [DB1]' failed.
What should I do?
And by the way, another question concerning multiple databases:
- DB1 has TB1 table with 2 columns: TB1_id (obvious) and TB1_name
- DB2 has TB2 table with TB2_FK column that contains foreign keys to DB1.TB1
If I get a tb2 object (that is a record from TB2) - can I read tb2.TB2_FK.TB1_name? Can I execute a query like this:
select * from TB2Extent where TB2_FK.TB1_name = 'xxx'
Regards
Tomasz