I'm new to SQL server programming and trying to open a connection to
MS SQL Server 2005 from VB.NET. I created a new databse called lion;
thus in the browsing file folder window in "MS SQL Server Management
Studio Express" lion appears under "Databases"
and changed the "Databases>security>logins>sa" password to xxx
from vb.net I try to connect but get the following error:
A connection was successfully established with the server, but then
an
error occurred during the login process. (provider: Shared Memory
Provider, error: 0 - No process is on the other end of the pipe.)
I know is basic, but I'm having problems finding the solution to this
in the previous postings. Any help on this matter would be greatly
appreciated
PS. I started a post
http://groups.google.com/group/microsoft.public.dotnet.languages.vb/browse_threa
d/thread/477bd4f5b2b01407?hl=en#
in vb.net group but was referred to this forum
The error occurs in the line= cn.Open() . The complete code is this:
Namespace lion
Public Class DB
'database connect
Private Function connect() As SqlConnection
Dim connectionstring As String
connectionstring = "Initial Catalog=lion;Data Source=DCORE
\SQLEXPRESS;User Id=sa;Password=xxx"
Dim cn As New SqlConnection(connectionstring)
Return cn
End Function
Public Function login(ByVal un As String, ByVal psw As
String)
As DataSet
Dim cn As New SqlConnection
Dim sql As String
Dim ds As New DataSet
Dim dtContacts As New DataTable("Customers")
ds = Nothing
sql = "SELECT * FROM Customers'"
'use the connection function created above
cn = connect()
cn.Open()
Dim da As New SqlDataAdapter(sql, cn)
da.Fill(ds, "Contacts")
'cn.Close() -- note: connection closed automatically by
da.Fill
Return ds
End Function
End Class
End Namespace
Eric Isaacs - 04 Jul 2008 00:26 GMT
> A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)
======================
See if this helps:
http://technet.microsoft.com/en-us/library/ms175496.aspx
-Eric Isaacs
Maninder - 04 Jul 2008 04:23 GMT
try this:
Click START--> RUN--> cliconfg
In the SQL Server Client Network Utility ENABLE Named Pipes and TCP/
IP. Goto Alias TAB.
Click ADD and include the name of the SERVER to connect in the SERVER
ALIAS box only.
Click OK and OK.
Now try to make a connection and check if this Works.