0

I am not too experienced with SQL but am fairly strong in C#. I am coding an app that requires a local database, and I choose to use a simple SQL Database. I use Microsoft Visual Studio 2010 Express, and have the SQL package that came with the download. The way I created the database was:

  • Right-Click on the project in solution explorer>Add>New Item...
  • Local Database, named Database1
  • I then create a table called Table1
  • Data>Add New Data Source --- Database>Dataset>[It creates a new connection/dataset called Database1DataSet1]

Can give me a link/explination with good instructions of how to do simple things such as set variables to entries, create new entries, delete entries etc. ?

Thank you

2
  • 8
    "Fairly strong in C#" and using "Database1DataSet1"... Commented Sep 6, 2011 at 19:21
  • @Blindy: I suppose it's entirely possible that Squeakers has worked for years in real time systems development using C# without needing to perform any database interaction... but I agree, that's highly unlikely. ;) Commented Sep 6, 2011 at 19:43

2 Answers 2

5

This is not a question easily answered in a forum such as this. Working effectively with databases requires more than a simple tutorial. I suggest that you pick up a good SQL Server / .NET book.

The reason I claim this is that whilst a tutorial might show you how to get things done, knowing why things are done the way they are simply requires more knowledge than what can be expressed in a tutorial format. And knowing the theory is mandatory to avoid databases turn into a nightmare.

I believe this book would be nice entry point

Beginning C# 2008 Databases

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

Comments

1

It may be worth considering NHibernate to perform your object mapping. There are some pretty easy to follow tutorials on the net for things like auto configured databases etc.

http://community.jboss.org/wiki/NHibernateForNET

3 Comments

I would think that the OP probably needs to understand a bit more about databases and how they work before going down the ORM path. Introducing an ORM without any fundamental understanding would just confuse them.
I agree. Start with the basics, or things gets messy before you can say nhibernate
fair comment, just from a personal perspective some of the auto configure fluent NHibernate stuff can effectively hide the DB implementation from the developer. If you are a pure c# guy and "just want your model persisted" it can be simpler and quicker. You dont have to understand how ALL of it works to get a result. Therefore it can be a valid option

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.