Oledb Error Code = 4060
Contents |
Results 1 to 6 of 6 Thread: Cannot open database error 4060 LinkBack LinkBack URL About LinkBacks Bookmark & Share Digg sql server error 4060 cannot open database this Thread!Add Thread to del.icio.usBookmark in TechnoratiTweet this thread Thread Tools Show sql server error 4060 server rejected the connection Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 01-09-2007
Microsoft Sql Server Error 4060
#1 JobHelper 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
Cannot Open Database Requested By The Login. The Login Failed. Login Failed For User
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] Reply With Quote 01-11-2007 #2 Jim.Anderson Contributing Member Join Date Jun 2006 Answers 95 Re: Cannot open database cannot open database requested by the login c# 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 Reply With Quote 01-15-2007 #3 Boris Kofman 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 te
(Русский)ישראל (עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語) HomeLibraryLearnDownloadsTroubleshootingCommunityForums Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From
Cannot Open Database Requested By The Login. The Login Failed. Clientconnectionid
My Forums Answered by: OLE DB cant connect to some cannot open database requested by the login. the login failed. visual studio databases. SQL Server > SQL Server Data Access Question 0 Sign in to vote cannot open database requested by the login the login failed windows authentication HiIm using OLE DB to connect to MS SQL 2005 server.It connects ok to any DB on SQL server that runs on my computer http://www.geekinterview.com/talk/1933-cannot-open-database-error-4060-a.html but fails to connect to some databases on SQL server that runs on other computer.(I mean there are some databases that i can connect and there are some that i cant, all those databases are running on same instance of MS SQL server 2005).Most interesting fact that https://social.msdn.microsoft.com/Forums/sqlserver/en-US/ffec3dae-980f-4ebb-9fd2-c671ba1fcf26/ole-db-cant-connect-to-some-databases?forum=sqldataaccess i can connect to data base named ServisionDB , but i cant connect to DB1 wich is restored backup of ServisionDB.Here is the code that i use to connect to DB. ULONG cProperties = 0; DBPROP rgProperties[11]; ULONG cPropSets = 0; DBPROPSET rgPropSets[1]; LPWSTR pwszProgID = L"SQLOLEDB"; LPWSTR pwszDatabase = NULL; LPWSTR pwszDataSource = NULL; LPWSTR pwszUserID = NULL; LPWSTR pwszPassword = NULL; CString ProviderString; ProviderString.Format(L"data source=%s;Trusted_Connection=yes;DATABASE=%s;uid=%s;pwd=%s;",ServerName,DBName,UserName, Password); LPWSTR pwszProviderString = T2W(ProviderString.GetBuffer()); HRESULT hr; memset(rgBinding, 0, ( sizeof(rgBinding) / sizeof(rgBinding[0])) * sizeof(DBBINDING) ); // Set init props for ( ULONG i = 0 ; i < sizeof(rgProperties) / sizeof(rgProperties[0]) ; i++ ) VariantInit(&rgProperties.vValue); // Obtain the provider's clsid CLSID clsidProv; hr = CLSIDFromProgID(pwszProgID, &clsidProv); // Get our initial connection CoInitialize(NULL); if (SUCCEEDED(hr)) hr = CoCreateInstance(clsidProv, NULL, CLSCTX_ALL, IID_IDBInitialize,(void **)&pIDBInitialize); if (SUCCEEDED(hr)) hr = pIDBInitialize->QueryInterface(IID_IDBProperties, (void **)&pIDBProperties); // DBPROP_INIT_DATAS
up Recent PostsRecent Posts Popular TopicsPopular Topics Home Search Members Calendar Who's On Home » SQL Server 2005 » SQL http://www.sqlservercentral.com/Forums/Topic410020-324-1.aspx Server Express » SQL 2005 Express connection with Crystal XI SQL 2005 Express connection with Crystal XI Rate Topic Display Mode Topic Options Author Message Charlie-120533Charlie-120533 Posted Friday, October 12, 2007 8:41 AM SSC-Addicted Group: General Forum Members Last Login: Monday, April 20, 2015 9:52 AM Points: 447, Visits: 3,927 Hello folks - I need a little help with SQL 2005 Express and Crystal Reports XI. cannot open I have installed SQl and three databases on my desktop, and I have set myself up as DB owner in all databases. I can access everything through Management Studio Express, but when I try to make a new connection in Crystal, I get the following error using Integrated Security: Failed to open the connection. Details: ADO Error Code 0x80004005 Source: Microsoft OLE DB Provider for SQL Server cannot open database Description: Cannot open database 'CMS1'requested by the login. The login failed. SQL State: 42000 Native Error: 4060 [Database Vendor Code:4060] Using User ID and Password, the error is: Logon Failed Details: ADO Error Code 0x80004005 Source: Microsoft OLE DB Provider for SQL Server Description: Login failed for user 'xyz\charlie'. The user is not associated with a trusted SQL Server connection SQL State: 42000 Native Error:18452 [Database Vendor Code:18452 ] Now, the odd part is that I can connect to ALL of the System databases (master, model, msdb, and tempdb) using the same connections through Crystal. Also, I can access these databases using Access without a problem. I am running a Dell Optiplex 745 dual core, two gigs memory, XP Pro with SP2. The SQL 2005 is loaded on my desktop as is Crystal. I'm sure it has to be a security setting somewhere, but I cannot seem to find it. I have looked through SSC but I can't find this particular problem. Any help is appreciated. Post #410020 Charlie-120533Charlie-120533 Posted Tuesday, October 16, 2007 6:53 AM SSC-Addicted Group: General Forum Members Last Login: Monday, April 20, 2015 9:52 AM Points: 447, Visits: 3,927 Hello, again. I figure