Sure. You need to specify both the database and the table for the tables that not in the database specified in the connection
string. Assuming you have the "gasstations" database specified in the connection string you can access the tables in the
"customers" database (if you proper security access to it) as follows:
SELECT * FROM customers.dbo.table_name WHERE ...
or
SELECT * FROM customers..table_name WHERE ...
I hope this helps.
--
Al Reid
"It ain't what you don't know that gets you into trouble. It's what you know
for sure that just ain't so." --- Mark Twain
"Bill nguyen" <bi*****************@jaco.com> wrote in message news:ub****************@TK2MSFTNGP14.phx.gbl...
Is there a way to access 2 databases simultaneously using a single
connection string?
I'm working on a VB.NET application and using 2 different connection strings
to access each database..
server: SQLSERVER
databases:
gasstations
customers
Thanks
Bill