Hi,
I am developing a Device Aplication in C# and I have a problem with connection from Visual Studio 2005 to SQL Server 2005.
My connection string should be correct:
I enabled TCP/IP in SQL Server Configuration Manager under "Protocols for MSSQL" and cleared TCP Dynamic ports. I set in menu "IP All" TCP Port to 1433. I restarted the server.
I turned off the firewall.
When I run
in the command prompt I can see address 0.0.0.0:1433 LISTENING.
I can add a new DataSet to my project from menu Data->Add Connection. I use SQL Server Authentication with a correct name/password. When I press the button "Test Connection" it works.
I also added DataGrid to the form using the added DataSet. When I debug the project with the Pocket PC 2003 SE Emulator deployed I get instead of the data table sqlException.
Can anyone help me ?
I am developing a Device Aplication in C# and I have a problem with connection from Visual Studio 2005 to SQL Server 2005.
My connection string should be correct:
Code:
SqlConnection cn = new SqlConnection; cn.ConnectionString="Data source=MyPC;Initial Catalog=MyDB;User ID=MyID;Password=MyPassword;" try { cn.Open // this is where I get sqlException: Specified SQL server not found: MyPC ...
I turned off the firewall.
When I run
Code:
netstat -n -a
I can add a new DataSet to my project from menu Data->Add Connection. I use SQL Server Authentication with a correct name/password. When I press the button "Test Connection" it works.
I also added DataGrid to the form using the added DataSet. When I debug the project with the Pocket PC 2003 SE Emulator deployed I get instead of the data table sqlException.
Can anyone help me ?
Comment