Click here to Skip to main content
15,896,359 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
I'm on a project that includes sql database but i can't create a sql database in c# I know to add a sql database by right clicking on the solution explore, but I don't know how to update, delete, and add data by a button.
Posted
Updated 12-Apr-11 5:57am
v2

For the database connection you will be needing a connection string.

For this you can find the appropriate connection string here[^]. This one explains how it can be done. " Beginners guide to accessing SQL Server through C#[^] "

For the create, update, delete oerations we basically call the "CRUD Operations" you have to check these web pages;

Using ADO.NET for beginners[^]

http://www.csharp-station.com/Tutorials/AdoDotNet/Lesson01.aspx[^]

For more advanced level use LINQ;

http://www.dotnetspark.com/kb/667-crud-operations-using-linq-entities.aspx[^]
 
Share this answer
 
Comments
wizardzz 12-Apr-11 14:03pm    
Nice breakdown and links.
Orcun Iyigun 12-Apr-11 14:38pm    
Thanks.
You should try google. This is the first link and is probably useful. http://msdn.microsoft.com/en-us/library/ms186197%28v=vs.80%29.aspx[^]
 
Share this answer
 
Comments
wizardzz 12-Apr-11 12:12pm    
Hmm, 1 voted, okay?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900