Click here to Skip to main content
15,899,314 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
i am not able to establish a proper connection because of connection string. tha application configration file is nt gettng connected to the forms ..i feel
Posted

1 solution

You PROVIDE a connection string to your app so it can know how to connect to your database. This is usually done in the app.config file, something like this:
<configuration>
  <connectionstrings>
    <add name="MyAppDatabase" providername="System.Data.SqlClient" connectionstring="Server=.;initial catalog=MyApplicationDb;Integrated Security=True;" />
  </connectionstrings></configuration>

But, of course, what you put in this string is entirely dependent on the database engine you're using, how you're connecting to it, and what kind of security credentials you have to provide and how.
 
Share this answer
 

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