1

I am trying to get some data stored in a database that i can query at a later date to display a record. I can make the database in visual studio 2010 no problems with all the fields i need. I just can seem to get the program to access it and add any data. I also have searched for help on the internet but they all seem to not work for me they say that the cannot find the database. I currently have no code to show because i am not sure what i should be doing. Any good websites to view could be helpful i cant find any good ones.

thanks in advance

4
  • What database are we talking about? SQL, MySQL, Oracle ...? Commented Jun 23, 2011 at 12:53
  • i was looking at sql as i can make it from within vs2010 Commented Jun 23, 2011 at 12:56
  • Then check the server explorer, more info in my answer below. Commented Jun 23, 2011 at 12:59
  • Updated my answer with another tool called SQL Server Management Studio, it may as well be worth checking out. Commented Jun 27, 2011 at 11:42

2 Answers 2

1

There is a database tool called Server Explorer that is shipped with visual studio 2010.

To access it navigate to View->Server Explorer (or Ctrl+W,L). Then right-click on Data Connections and select Add Connection or Create new SQL Databasedepending on your needs. Once you have a connection setup you can edit tables, insert data etc from the server explorer. If you for example have a local SQL Server running its just to select your own computer as server name (should appear in the drop down list), use windows authentication as login method and choose a name for your new db.

Side note: the server explorer works for other databases as well but may require that you install additional connectors etc.


Another good tool to manage your SQL databases is the SQL Server Management Studio. It needs to be installed separately, a guide to do so is available here: Installing SQL Server Management Studio Express 2008. In my opinion this interface gives you better control of your databases, tables, stored procedures etc.

Sign up to request clarification or add additional context in comments.

1 Comment

i have go that setup now but i am now not sure how to put data from an input on the program into a field
0

You can find basic information about database access on msdn.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.