views:

39

answers:

0

Dear All,

I have a problem with connecting to a server which is another machine. When i try connecting my machine with the following code, it works fine:

'connString = "Data Source = .\sqlexpress;" & _
'"Initial Catalog = one;" & _
'"Integrated Security = SSPI"

Try
conn = New SqlConnection(connString)
conn.Open()
MessageBox.Show("Connection Successful")
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

But when i try to get connected to another machine where SQL Server 2000 is installed, i get a timeout message. The code is as follows:

connString = "Server = xxx.xxx.xxx.xxx;" & _
"Initial Catalog = one;User Id=xxxx; Password=xxxxx;" & _
"Integrated Security = SSPI"

Try
conn = New SqlConnection(connString)
conn.Open()
MessageBox.Show("Connection Successful")
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Can anyone please help me on this issue.

Regards,
George