Link to home
Start Free TrialLog in
Avatar of franklinan
franklinan

asked on

Error trying to connect SQLServer Express on REMOTE Computer with my VB.NET application

I have this really simple code to try to connect from a remote computer to my Database on SQl server 2005 Express :

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim cn As New SqlConnection
        Try
            cn.ConnectionString = "Data Source=192.168.1.45\SQLEXPRESS;Initial Catalog=Historic;Persist Security Info=True;User ID=ZC;Password=DZC"
            cn.Open()
            MessageBox.Show("Conx abierta", "hola", MessageBoxButtons.OK)
            cn.Close()
        Catch ex As SqlException
            MessageBox.Show(ex.Message, "error", MessageBoxButtons.OK)
        End Try

    End Sub

To trials, I've my Firwall OFF, and also I'VE SET UP MY SQL Server Express CONFIGURATION MANAGER, enabling my TCP/IP Conncetions !

What is happening ? ? ? My error message says that my server is not found....Maybe because I've my Server on the default config, but is not true,I've my sql server set up correctly I think.... Ant HELP ? ? ? ?  ?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of LordWabbit
LordWabbit

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of franklinan
franklinan

ASKER

Tnaks !"! ! ! !

The only thing was missed was the SQL Server Browser Service..... Thanks ! ! ! !


Frank