•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 456,533 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,886 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser: Programming Forums
Views: 836 | Replies: 1
![]() |
•
•
Join Date: Sep 2007
Posts: 23
Reputation:
Rep Power: 2
Solved Threads: 0
Hi!
I wish to specify more than one databases in my connection string in a vb.net project, in order to retrieve records from both of them.
For example,
I have 2 databases , database A and database B
I wish to retrieve the city field from the emp tables of both of them, like this
select a.dbo.emp.city from a.dbo.emp union select b.dbo.emp.city from b.dbo.emp
How is this possible?????
I wish to specify more than one databases in my connection string in a vb.net project, in order to retrieve records from both of them.
For example,
I have 2 databases , database A and database B
I wish to retrieve the city field from the emp tables of both of them, like this
select a.dbo.emp.city from a.dbo.emp union select b.dbo.emp.city from b.dbo.emp
How is this possible?????
•
•
Join Date: Sep 2007
Posts: 1,058
Reputation:
Rep Power: 4
Solved Threads: 61
•
•
•
•
I wish to retrieve the city field from the emp tables of both of them, like this
select a.dbo.emp.city from a.dbo.emp union select b.dbo.emp.city from b.dbo.emp
How is this possible?????
Well first, this is more of an SQL question. But anyway, just do it this way following your syntax:
"SELECT a.dbo.emp.city, b.ado.emp.city FROM a.dbo.emp, b.dbo.emp"
"SELECT database1.dbo.table.column, database2.dbo.table.column FROM database1.dbo.table, database2.dbo.table"
![]() |
•
•
•
•
•
•
•
•
DaniWeb VB.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
.net .net framework 3.0 access adsl adsl1 adsl2+ asp avatar backup breach cable code combo connection custom daniweb data data protection database design download dropdownlist government hacker ibm internet kb mbit medicine microsoft module net network news normalization per reuse second security server skin sql survey testing theme throughput upload web windows workflow 240000
- JSP connection to database (JSP)
- database connection (ASP.NET)
- how to create new table in MS Access2003 database using VB6 (Visual Basic 4 / 5 / 6)
- Problem with database connection (JSP)
- Database Connection in Visual Studio 2005 (ASP.NET)
- direct remote sql connection (Visual Basic 4 / 5 / 6)
- This Database is a Monster (MS Access and FileMaker Pro)
- Establishing A connection between Three programs. (C++)
Other Threads in the VB.NET Forum
- Previous Thread: Duplicate print jobs using .NET
- Next Thread: Data Visualization requirement



Linear Mode