Gemma

Hi Guys,

Anyone out there who could help this girl. I'm trying to connect to a remote sql server and I can't establish the connection.
This is only happening after click once deployement. It's working fine when I'm using Visual studio to run it.

The sql server has the remote connections enabled, sql browser service running and windows firewall disabled.


Any ideas


TA Gemma



Re: Windows Forms Data Controls and Databinding Remote sql server not connecting using windows forms

Suprotim Agarwal

Hi,

Post the the error that you get and someone will have a look at it.

HTH,
Suprotim Agarwal






Re: Windows Forms Data Controls and Databinding Remote sql server not connecting using windows forms

Gemma

Here is the error:

System.Data.SqlClient.SqlException was unhandled
Class=20
ErrorCode=-2146232060
LineNumber=0
Message="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)"





Re: Windows Forms Data Controls and Databinding Remote sql server not connecting using windows forms

Suprotim Agarwal

Hi,

Thanks. Now you have already mentioned that you have enabled remote connections. Have you used the configuration manager to also enable TCP/IP, Named Pipes and the Browser service

Remember to restart the MsSqlService (On the Surface Area Configuration for Services and Connections page, expand Database Engine, click Service, click Stop, wait until the MSSQLSERVER service stops, and then click Start to restart the MSSQLSERVER service.)

Check this link for generic remote connection issues.

http://blogs.msdn.com/sql_protocols/archive/2005/09/28/474698.aspx

HTH,
Suprotim Agarwal

-----
http://www.dotnetcurry.com
-----






Re: Windows Forms Data Controls and Databinding Remote sql server not connecting using windows forms

Gemma

I've already enabled the TCP/IP, named pipes and Browser service.

I did actually i restarted it 2-3 times.

It is still not working. any more ideas


TA
Gemma





Re: Windows Forms Data Controls and Databinding Remote sql server not connecting using windows forms

Suprotim Agarwal

Hi,

Post your connection string and the code using which you connect to the database

HTH,
Suprotim Agarwal

-----
http://www.dotnetcurry.com
-----






Re: Windows Forms Data Controls and Databinding Remote sql server not connecting using windows forms

Gemma

Hi Suprotim,

I think you don't understand the problem. It is working in 1 pc after I changed the connection string but it is not working in other with the same string. Previously it was giving me this manifest error so I used mageUI.exe to sign the manifest now the application starts after install but doesn't connect to the database.

I've tried both name of the server and IP address as well.

In anycase here is the connection string:

Data Source=SQLTMP1;Initial Catalog=DB123;Integrated Security=True





Re: Windows Forms Data Controls and Databinding Remote sql server not connecting using windows forms

ERP1


Hi !
if your conectionstring is not problem , this will be picture Configution Sql2005 Server :
http://download.yousendit.com/7E3C01CA5497D116









Re: Windows Forms Data Controls and Databinding Remote sql server not connecting using windows forms

Gemma

Already checked it before, that is not the problem.

I'll check it thorougly with network administrator but I'm really disappointed by the responses over here.

TA
Gemma