Question : DSN Default Database Question

This should be a fairly easy question for somebody.  Here's the jist of it, I'm using ADODB in VB.NET to connect to a SQL-Server 2000.  I am connecting to a database that isn't the user's default database and I want to be able to run a query without having to fully spell out the table names aka, I want to do (basically I wrote all my code to an original Access database and don't want to update it):

select * from table

INSTEAD of

select * from myDatabase.dbo.table

Here is the connection string I'm using that I thought would specify the default database but for some reason it's ignoring it or I have the syntax wrong for how I'm trying to connection.

conn.Open("DRIVER={SQL Server};UID=myUser;PWD=myPassword;SERVER=myServer;Description=My SQL Server;Database=myDatabase;")

Answer : DSN Default Database Question

Create a command execute
Use databasename
GO

That I think will handle it.
Random Solutions  
 
programming4us programming4us