How to connect to sql database?

I have created a sql server database (2008) using visual studio 2008. I have included it in my project created a "connection" to it using server/explorer toolbar. My issue is how do i connect to in code. How to i get access to be able to SELECT and UPDATE and so on in my database. I am using c# by the way. I create a SqlConnection object and passed in a the necessary parameters. The issue is that i get a error message when I debug my project that says the database could not log in to my user. I cannot figure out which user I need to pass in for my uid field. I have even tried recreating the database, but I never gave it a user id so I am wondering what would be the best solution to get access to a database. I am willing to completely start over, i don't have very much code written.

Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Helpful Social

Copyright © 2024 QUIZLS.COM - All rights reserved.