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)
Please tell me, when I make a connection with Microsoft SQL Server 2005 which is included in visual studio.
So there is no manager, I just make connection with it by a wizard so it became but i have to work drage and drop from
Data source so I want to work it by coding mean like this:
con = New SqlConnection("server=(LOCALHOST);database=shaan;integrated security=true")
and I want to insert my own command like this:
com = New SqlCommand("insert into table(namee,pass)values('" & Trim(txtuser.Text) & "','" & Trim(txtpass.Text) & "', '" & Date.Now.Day & "/" & Date.Now.Month & "/" & Date.Now.Year & "'", Me.con)
adpt = New SqlDataAdapter
adpt.SelectCommand = com
table = New DataTable
adpt.Fill(table)
MsgBox("New Account Created Successfully", MsgBoxStyle.Information, "W E L C O M E")
Return table
Please tell me somebody...