0

Sir, i hv a problem with database? in my PC i have sql server (develop) edition 2000 and MS-SQL server 2005 (sql server management studio express CTP) . In my web page asp.net (vb.net) data connection is succedded. But when i run the web page and fill up the text boxes and click on the save button an error message will display like (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.)
My code is

Imports System.Data.SqlClient
Partial Class _Default
    Inherits System.Web.UI.Page
    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim con As New SqlConnection("server= LAB3; database= third")
        Dim cmd As New SqlCommand
        cmd = New SqlCommand("insert into eye values (' " & TextBox1.Text & " ',' " & TextBox2.Text & " ',' " & TextBox3.Text & " ',' " & TextBox4.Text & " ')", con)
        con.Open()
        cmd.ExecuteNonQuery()
        con.Close()
    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim con As New SqlConnection("server= LAB3; database= third")
        Dim cmd As New SqlCommand
    End Sub
End Class

Edited by Dani: Added code tags

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by __avd
0

Change the connection string. Use Server Explorer menu item to get correct connection string.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.