Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all
i have online data base
iam trying to connect to it through visual studio 2010
by putting the server name and password and userid
but can not connect
could any one help me ?
Posted
Comments
Deepu S Nair 16-Feb-15 3:02am    
what error you got?

1 solution

There are a lot of possible problems, starting with "is the DB configured to accept remote connections?" - many aren't for security reasons - and ending with "are your credentials correct?". Unfortunately, the error messages generally aren't very helpful (sometimes I suspect deliberately so, so prevent giving hackers information on what they are doing wrong).

Start by trying a connection directly in VS with the Server Explorer pane:
1) Open Server Explorer.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource, and database, specify the security info, and press the "Test connection" button.
4) When the connection works, press "OK"
5) Highlight your database in the Server Explorer pane, and look at the Properties pane. A working example of the connection string will be shown, which you can copy and paste into your app or config file.

If the test connection fails, you need to look at the error message closely - it may give you a clue as to what the problem might be. But without that, we are all working in the dark!
 
Share this answer
 
Comments
fady_hasnaa 16-Feb-15 3:48am    
the pass & user & server is right
i think the problem in this part
the DB configured to accept remote connections?

how can i make the DB configured to accept remote connections?
from visual studio step by step pleaz
thanks
OriginalGriff 16-Feb-15 4:03am    
You can't.
You need to access the DB in order to do that, and if it is configured to not accept remote connections you can't access it remotely to do that. Otherwise there would be no point in forbidding remote connections as anyone could change it! :laugh:

You need to talk to the DB admin and get him to change the settings.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900