G
Guest
I have rather hastily installed VB 2005 Express and SQL Server 2005 Express
on my machine and I haven't much experience with either. So far as I can
remember I have mostly used default settings. SQL Exp. is set to use Windows
validation. I already have SQL Server 2000 Developer installed so my SQL
2005 Exp. instance is called SQLEXPRESS. I'm not sure whether I've forgotten
how to code or I have a server problem.
As a test, I am trying a basic connect with ADO.Net and I am getting
nowhere. Here is the code.
c.ConnectionString = "Data Source=SQLEXPRESS;Initial
Catalog=AdventureWorks_Data;Trusted_Connection=True; "
c.Open()
Dim da As New SqlDataAdapter("Select * from Store", c)
da.Fill(ds, "Store")
c.Close()
It crashes on open. The error message is:
An error has occurred while establishing a connection to the server. When
connecting to SQL Server 2005, this failure may be caused by the fact that
under the default settings SQL Server does not allow remote connections.
(provider: Named Pipes Provider, error: 40 - Could not open a connection to
SQL Server)
Where's the best place to start looking? (Remote connections?)
on my machine and I haven't much experience with either. So far as I can
remember I have mostly used default settings. SQL Exp. is set to use Windows
validation. I already have SQL Server 2000 Developer installed so my SQL
2005 Exp. instance is called SQLEXPRESS. I'm not sure whether I've forgotten
how to code or I have a server problem.
As a test, I am trying a basic connect with ADO.Net and I am getting
nowhere. Here is the code.
c.ConnectionString = "Data Source=SQLEXPRESS;Initial
Catalog=AdventureWorks_Data;Trusted_Connection=True; "
c.Open()
Dim da As New SqlDataAdapter("Select * from Store", c)
da.Fill(ds, "Store")
c.Close()
It crashes on open. The error message is:
An error has occurred while establishing a connection to the server. When
connecting to SQL Server 2005, this failure may be caused by the fact that
under the default settings SQL Server does not allow remote connections.
(provider: Named Pipes Provider, error: 40 - Could not open a connection to
SQL Server)
Where's the best place to start looking? (Remote connections?)