Hello! That may not be much, but I think you have to enter "servername \instance" (with backslash) instead of "servername/instance"...
On 24 août, 19:51, stanlei <[email protected]> wrote: > i've been trying this for days and i just dont know what the problem > is ... > > im using: > > private string conns = "Data Source = 'MOI-PC/SQLEXPRESS;Initial > Catalog = Project; User ID = sa; Password = madurai'; Connect Timeout > = 60;"; > > SqlConnection conn = new SqlConnection(conns); > conn.ConnectionString = conns; > > try > { > conn.Open(); > } > catch (Exception ex) > { > > MessageBox.Show("ERROR \n"+ex.Message); > } > > All i get is .. > > A network-related or instance-specific error occurred while > establishing a connection to SQL Server. The server was not found or > was not accessible. Verify that the instance name is correct and that > SQL Server is configured to allow remote connections. (provider: Named > Pipes Provider, error: 40 - Could not open a connection to SQL Server) > > I use Windows Vista Ultimate SP2, SQL server 2005 SP3 and Visual > Studio 2005 > sql server is configured to accept remote connections .... both tcp/ip > n named pipes > my sql browser is running .... > > any help would be greatly appreciated!!
