开发者

Simple SQL commands for C#

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 Tabl开发者_如何学编程e1
  • 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


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜