I have created connection string between sql server 2008 r2 and visual studio 2013 in windows authentication mode
but when I run program it's done error at conn.open
the connection string is
connectionString="Data Source=kardinia-PC;Initial Catalog=NewSalariesDB; Persist Security Info= false;"
providerName="System.Data.SqlClient" />
is this correct?
3 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Saber ShaikhPosted Apr 15, 2015, 12:44 AM
then Got to View menu then select server explorer
Right Click on Data conection and select add connection
Enter Your Server Name And browse data base text and ok when connection is add then right click and goto
Properties and you can got the connectionString Copy and past in
connectionString=""
That
ok
My Blog Refer to improve self : http://aspnettutorialscode.blogspot.in/search/label/GridView
if you like answers then check To Answer
Khargesh RajputPosted Apr 14, 2015, 9:54 AM
In server explorer add a connection from.wizard
And after connection right click and.properties on database check connection string
Manoj BhoirPosted Apr 14, 2015, 9:47 AM
There are many reasons for getting failed to connect with Database. If your database and application not on same machine then there may be posibility of connection failed due to Network issue or something else. First of all try to connect your database using Microsoft SQL Server itself and if there is no issue then check your code.
For more information about connection strings please visit :
http://www.connectionstrings.com/sql-server/