Results 1 to 6 of 6

Thread: Cannot open database error 4060

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Expert Member
    Join Date
    Oct 2006
    Answers
    209

    Cannot open database error 4060

    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 4060

    I was trying different connectionStrings,reinstallSql server,but have the same massage:"Cannot open database".

    Maybe somebody has answerThanks,Boris

    NOTE : [This question was asked by Boris Kofman]


  2. #2
    Contributing Member
    Join Date
    Jun 2006
    Answers
    95

    Re: Cannot open database error 4060

    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


  3. #3
    Junior Member
    Join Date
    Jan 2007
    Answers
    2

    Re: Cannot open database error 4060

    Hi Jim
    I am sorry but i am not a professional so many things are not clear for me.
    1.How can I be sure that server is running?
    2.I have no idea what kind of authentication did I select .. mixed or windows
    3.In my Express Edition there is no management studio utility to set permeation to server,at least I could not find this place.
    4.Yes I did create "First",but was testing different DB's with the same result
    Thank you ,Jim

    boris


  4. #4
    Expert Member
    Join Date
    Sep 2006
    Answers
    477

    Re: Cannot open database error 4060

    1) To cherck if the server is running, you can check it in taskmanager>processes. Or go to Control Panel>Administrative Tools>Services and check for SQL Server Service.
    2)While installing the SQL server, it will usually ask which type of authentication to be used. I don't remember SQL Server Express Edition asking anything like this. So, I guess, by default you authentication will be Mixed.
    3)You can Download server management studio Express Edition from Microsoft and install

    Well, I don't have SQLServer installed in tyhis machine of mine. Will check and post if I find out anything after 10hrs.

    Hope your problem gets solved befor that

    Cheers!
    Kalayama

    [COLOR="Blue"][SIZE="2"]"If you are not living on the edge of your life, you are wasting space"[/SIZE][/COLOR]

    Someone says "Impossible is nothing". The man next him says "Let me see you licking your elbow tip!"

  5. #5
    Junior Member
    Join Date
    Jan 2007
    Answers
    2

    Re: Cannot open database error 4060

    Yes,server is running.download server management studio.But it doesn't want
    to axcept any changes,where Windows Authentication.
    Boris


  6. #6
    Expert Member
    Join Date
    Dec 2006
    Answers
    139

    Re: Cannot open database error 4060

    Hi, 1. On the server, click start, all programs, soapware, server and finally datamanager. 2. Login to your server using the sa account by clicking ok. 3. Most sa accounts don't have passwords assigned to them. If a blank password doesn't work, consult your system administrator to find the password. Once the datamanager is open, from the menu item choose actions, add soapware account. You should then receive the notice "soapware user account added". Click ok. 4. Close the datamanager. 5. Try to run soapware. If your using sql standard or enterprise without the datamanager, see note below. Note: for those who are using sql standard and don't want to install or use the data manager, you can add the soapuser account manually to each database using "enterprise manager. The username is "soapuser" and the password is "soapware". The database user properties/rights for the soapuser account should be public, db_ddladmin, db_datareader and db_datawriter. If using nt authentication, each user will need the same access to the databases. Sql administration is not in the scope of the docs, inc. Support agreement. Only sql administrators should attempt adding account information or altering account information. Incorrectly setting account information can render databases and servers unusable. Regards nikhil rattan


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact