Click here to Skip to main content
14,869,378 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
Hello :)

I want to retrieve some data to use it in my grid, but the problem is my database design contains two databases.

So, can I retrieve data from more than database, to use it at one grid ?

I use ASP.Net, C#.Net 4, Microsoft SQL Server 2008 R2

thanks in advance : )
Sergey Alexandrovich Kryukov 14-Oct-12 21:28pm
Of course you can, but the binding will need some extra effort; or you can develop your own method of population of unbound grid, which is also not a problem. It all depends on what do you want to do with the grid.
Why your database design contains two databases? It's highly suspicious. Why?
[no name] 14-Oct-12 23:35pm
I uses a local database related to each copy of my project, and global one that contains general data used by all copies.

thank you very much :)
[no name] 14-Oct-12 21:29pm
Why would you think you could not?
[no name] 14-Oct-12 23:35pm
cuz I didn't use this before, so I have no idea about that
If you are going to ask about everything you never did before, you won't go far.

1 solution

SELECT Col1, Col2
FROM DB1.Schema.Table
SELECT Col1, Col2
FROM DB2.Schema.Table

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900