Can not open Database (MS SQL) requested login failed

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have installed MSDE but when ever i try to connect to it from the same computer, it gives me
'Can not open Database requested in Login 'pubs' failed. Login fails

I tried everything nothing seem to work plz help

my connection string is as follow

Public Conn As New ADODB.Connectio
conn.Open("Driver={SQL Server};User ID=sa;Password=ab;Database=BigSQL;Server=Master\Mycube"

where 'Master' is the computer name and 'Mycube' is the insance name

Also If the computer is password protected, could that create the problem ?

Thanks
Bobby
 
If I remember right, MSDE is installed with Windows authentication
only. You need to run the command line to change this. I cannot
remember the exact codes to do this, but Im sure Mr Google could tell
you.
 
I have installed MSDE but when ever i try to connect to it from the same computer, it gives me
'Can not open Database requested in Login 'pubs' failed. Login fails'
my connection string is as follows

Public Conn As New ADODB.Connection
conn.Open("Driver={SQL Server};User ID=sa;Password=ab;Database=BigSQL;Server=Master\Mycube")

where 'Master' is the computer name and 'Mycube' is the insance name

Just out of curiosity - if you're using a .NET language, why do you
still use the ADODB stuff to connect to SQL Server?? Why not use
ADO.NET ?

The valid ADO.NET connection string would probably be something like:

Server=master\mycube;Database=BigSQL;User
ID=sa;Password=ab;Trusted_Connection=false

or better yet, as already mentioned, why don't you use the built-in
Windows authentication for SQL Server? IN that case, the connection
string would be even simpler:

Server=master\mycube;Database=BigSQL;Trusted_Connection=true

Marc
================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top