I have a local database and I want to be able to retrieve and insert data into it from C# files. I have read about the INSERT INTO and SELECT FROM SQL commands, but what I want to do is create C# functions that I can call to insert, edit, and retrieve information from the the database. For example:
public void InsertAccountData(string Usrname, string passwd)
{
INSERT INTO Account(Username, password) VALUES(Usrname, password);
}
I have tried to find an answer, but have not found a solid solution. How would I do this is C#?
This is how normally we access the DB. Current example is for MSSQL. http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.aspx