Prepare for your Next Interview
This is a discussion on Cannot open database error 4060 within the SQL Server forums, part of the Databases category; 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 = &...
|
|||
|
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] |
| Sponsored Links |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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!" |
|
|||
|
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
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do we know which error is generated? | JobHelper | QTP | 1 | 02-28-2008 07:06 AM |
| Cannot open registry key | JobHelper | Data Warehousing | 0 | 01-09-2007 06:15 AM |
| December 2006 : Member of the Month Contest Open | admin | Site News & Announcements | 0 | 12-02-2006 10:28 AM |
| Compilation error | JobHelper | SQL | 0 | 11-28-2006 09:37 AM |
| Microsoft CRM : Notify salespeople of open cases | Jim.Anderson | Microsoft CRM | 0 | 09-27-2006 07:39 AM |