I've just downloaded VB 2005 Express and SQL server 2005 express.Built database and tryingto connect and open DB.My code is:Public p_conFirst As New SqlConnection() p_conFirst.ConnectionString = "Server=bk;Database=First;Trusted_Connection=True;"p_conFirst.Open() 'error 4060I was trying different connectionStrings,reinstallSql server and Visual Basic but have the same massage:"Cannot open database.Login failed".Maybe somebody has answerThanks,Boris

Questions by Boris Kofman

Showing Answers 1 - 9 of 9 Answers

Boris,

few things...

1. Check to see if sql server is running ...
2. what kind of authentication did you select .. mixed or windows ..
3. if it's mixed, you can use the following connection string
4. if it's windows, you windows user account needs to have permission for sql server .. go to users option form management sudio, add your name as dbowner and assing default database...
5. did you create "First" database ..?

Let me know ...

Jim

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions