System.Data.SqlClient.SqlException: SQL Server does not exist or a

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am getting this error when I try to open database connection.

SqlConnection conn = new SqlConnection();
conn.ConnectionString = "Persist Security Info=False;User
ID=ABC;Pwd=XYZ;Initial Catalog=MYDB;Data Source=MYSQLSERVER";
conn.Open();
This is happening on my local machin, when I tryed same code on my collges
system it work....

There is no issue with connection string, user id and pwd and database!!!!!

Can any one please let me know how to fix this problem?
 
Does your local system have a default instance of SQL Server installed on
the target server? Is it setup to accept mixed-mode security? Are the ports
open? Is the server running? Do you have a login account setup with the
right password? Does this account have rights to the Initial Catalog? Have
you paid your phone bill? Have you read my book on ADO.NET?

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
.... Have you paid your phone bill? Have you read my book on ADO.NET?

LOL
 
Will or bill.

R U developer or phone bill collector....LOL

If you don't know solution, then stay away from the forum

There are so many other forum, where you can joke around.
 
If you spent 10 minutes on this forum, you would know that I often know the
answer. The problem with this particular question is that the answer depends
on a number of unanswered questions. If the person had not paid their phone
bill, they would not have connectivity. If they had read my book, they would
have a source for the answer as well...

As serious as some people think this subject is, if you can't have fun
working at it, find another job that is. Life is too short. There are those
of us here that expose themselves to the public and provide help on a daily
basis (sometimes hourly), and there are those that hide behind aliases and
contribute not. Which are you?
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

guru said:
Will or bill.

R U developer or phone bill collector....LOL

If you don't know solution, then stay away from the forum

There are so many other forum, where you can joke around.


Miha Markic said:
.... Have you paid your phone bill? Have you read my book on ADO.NET?

LOL

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/
SLODUG - Slovene Developer Users Group www.codezone-si.info
 
if you can't have fun working at it, find another job that is. Life is too
short.

"Jokes" are good to some peoples. I love to poke fun @ people sometime :).
However, there are others who may not accept jokes easily, especially those
that are not familiar with your culture. In fact, this forum is of
"international" type. We may never know who "abc" or "xyz" are, and who care
? I am never bothered with aliases. Bottom line: Show the poster a little
tip and if s/he wants more, s/he will find your book !

Good luck selling your book :)

John
 
WJ,

I did not found Bill's answer a joke, it has a lot of wisdom in it, it was
only not the answer Guru wanted. Bills answer was obvious: "Can you give
more information about?. At the end he wrote some fun (not a joke) probably
because he probably saw how much it was

I had to laugh as well with the last part of the answer, so why would Miha
not have told that. This is a community of regular visitors/posters you
know. I was in doubt to do that too, however decided not to do that. I
thought that one time was enough.

If somebody only want to give very few information to solve his problem, it
has no sense to answer those questions. Bill was so kind to ask for
information so that the OP could be helped by him or whatever others regular
visiting/posting to this group.

I was not expecting from you that you would agree with the second answer
from Guru. I would be sad if all humor was leaving these newsgroups. There
is already so little.

Just my opinion.

Cor
 
John,

Thanks for understanding my feelings! Yes you are right this is an
international forum people are from all over world and different culture.

One has to take little responsibility before they post anything. And should
not bother of Alisa.

Once again, thanks for posting your thoughts John.
-Guru
 
guru said:
John,

Thanks for understanding my feelings!

ok "guru". Suggestion: Before you set out to buy a book, please make sure to
visit google 1st. It has lots of goodies to offer at a free of charge!
Google is always on your side. Just ask it a ? and it gives some "very" good
answers! On top of that, it does not require your ID. What a generous thing
that the world has today !

John
 
Yeah, Google.
Do you think that it would give you some "very" good answers without people
like Vaughn posting them?
 
Miha Markic said:
Yeah, Google.

...without people like Vaughn posting them?

I never doubt about this forum contributors! They are indeed experts and
very helpful.
Do you think that it would give you some "very" good answers

Yes. What I meant was Google is an alternate source that is very very
helpful ! Generally, it links you to indepth stuffs that you may want to
know (depend on what your needs are). Here below are some of my points about
this thread and Google. I would like to prove that Google in this particular
instance is very efficient. Here goes:

1. "Guru" asked that his connection string (Persist Security Info=False;User
ID=ABC;Pwd=XYZ;Initial Catalog=MYDB;Data Source=MYSQLSERVER";)
gave him an error on his PC while the same connection string works fine on
his college system. So, he could be a student trying to learn a new product
and or
he is working for a college.

2. "Guru" did not provide the specific error message and this is forgivable
because young peoples are often quick and forgetful I am still very young
too). As an experience DB developer, one would assume that the error could
very well be "SQL Server does not exist and or access denied.", this is a
very common error in the MS/Platform. Again, I am just zeroing in his "Data
Source" attribute as a guess.

3. Now, if you punch the entire error message as is ("SQL Server does not
exist and or access denied.") into the Google search field, it will give you
plenty useful links. I always after the vendor who throws the error message.
In this case, I would click on the
"support.microsoft.com/default.aspx?scid=kb;en-us;328306" link that Google
showed me (#6th link starts from top). This event took me about 5 minutes of
IE browsing time including reading the site!
Can one get any better support at full detail and free than this Google help
tool provides ? Sure, Google sometimes messes me up big time! But nothing is
perfect anyway !

4. ..so, then, you may ask: Why do I and others still visit this Forum if
Google is such a wonderful tool ? Well, I always love "quick kill answers"
and down to specific. These types of answers, if given at 100%, it would be
wonderful and much appreciated, if not, at least a hint would be good
enough. Give it to me right now for I have no more patience to wait! And,
please, not a 300-500 pages book in a 5-minutes drill. I just need something
really quick ok ? Can you have it to me in 5 minutes ? Yes, you are a
genius, you can do it. Google may not have this capability (sometimes:) ).

5. So, Bill, we recognize your generosity here. Please continue your service
at this community! You shall be rewarded at the judgment day! And yes,
beginning with your book.

John
 
Back
Top