I’m somewhat new to C# – I have a connection string set in my app web.config called “ApplicationServices” Using C#, how can I write a certain SQL command that retrieves data from my database and set’s it to a string that I can operate on?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here is the full explanation.
http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.aspx
You can also use an ORM such as LINQ2SQL
http://codesamplez.com/database/linq-to-sql-c-sharp-tutorial
EDIT:
How to debug…
Below are some links on how to use the debugging features in visual studio.
http://msdn.microsoft.com/en-us/library/ms165053.aspx
http://msdn.microsoft.com/en-us/library/k0k771bt(v=vs.71).aspx
http://www.dotnetperls.com/debugging