471,350 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

SQL Server does not exist or access denied

I've been running a mobile app for ten months with no problem on three
different servers. When I installed the new netframework 2.0 It stopped
working on two servers that the new framework was installed on. The program
still works on the one the framework was not installed on. I receive the
error,

"SQL Server does not exist or access denied"

cn.Open();

Which is in code,

string conTest = "Server=username;uid=sa;pwd=apassword;database=Tes tDatabase";

string conTestCommand= "Select * From stable Where Username=@username";

SqlConnection cn = new SqlConnection();
cn.ConnectionString = conTest;
cn.Open()

Anyone know what the problem is?
Dec 28 '05 #1
4 1273
Dave wrote:
"SQL Server does not exist or access denied"
Anyone know what the problem is?


Have you checked using the SQL Server Network Utility (svrnetcn.exe) if
the protocol you're using is still enabled?

--
Andre Prins
Twain Development
Dec 28 '05 #2
Dave wrote:
"SQL Server does not exist or access denied"

Anyone know what the problem is?


Check, using the SQL Server Network Utility (svrnetcn.exe), if the
protocol you're using is still enabled.

HTH

--
Andre Prins
Twain Development
Dec 28 '05 #3
> string conTest =
"Server=username;uid=sa;pwd=apassword;database=Tes tDatabase"; Are you sure that your server is named "username"?

"Dave" <Da**@discussions.microsoft.com> schrieb im Newsbeitrag
news:1B**********************************@microsof t.com... I've been running a mobile app for ten months with no problem on three
different servers. When I installed the new netframework 2.0 It stopped
working on two servers that the new framework was installed on. The
program
still works on the one the framework was not installed on. I receive the
error,

"SQL Server does not exist or access denied"

cn.Open();

Which is in code,

string conTest =
"Server=username;uid=sa;pwd=apassword;database=Tes tDatabase";

string conTestCommand= "Select * From stable Where Username=@username";

SqlConnection cn = new SqlConnection();
cn.ConnectionString = conTest;
cn.Open()

Anyone know what the problem is?

Dec 29 '05 #4
Yes the protocol is still enabled.

The username is not the name of my server, but
that was just a typo while I was changing things so I wouldn't announce to
everyone what my computer name was.

"Andre Prins" wrote:
Dave wrote:
"SQL Server does not exist or access denied"

Anyone know what the problem is?


Check, using the SQL Server Network Utility (svrnetcn.exe), if the
protocol you're using is still enabled.

HTH

--
Andre Prins
Twain Development

Dec 29 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by george r smith | last post: by
3 posts views Thread by Olivogt | last post: by
9 posts views Thread by Steven Ung | last post: by
2 posts views Thread by Johan Johansson (Sweden) | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.