views:

65

answers:

1

Greetings.

I was wondering how I create a cross table query via C# when the databases are unattached (development)

I know the .mdf files are temporarily attached to the database when you execute--but that's really the source of the confusion. If your DB connections are all to separate database files that cause them to be dynamically attached (while using a sql server express and .mdf files) then how are you supposed to do anything with multiple DBs?

+1  A: 

I would imagine that you aren't. I'd recommending attaching the database files to an instance and connecting to the database directly.

That will be the only way to get the cross database chaining working correctly anyway.

mrdenny
Wow then that's really brutal that that is the default behavior of the dev environment..thanks. Will probably just bookmark this page and throw all tables in there and pray I never need a 3rd party database.thank you
brian
@brian, ideally you would want your dev environment as close as possible to what you will have in production. In the long run it will make your life a lot easier
baldy