I have created a web form registration page with 8 different fields (Usernametb, Firstname, Surnametb, Emailtb, Mobiletb, Postcodetb, Passwordtb) (tb=text box)
I have also created a database table in Access that has the right amount of columns for each different textbox.
How would I go about successfully linking my registration form to the database so that every time a user registers, it will automatically save his information in the database? ( I need to be able to add, remove and modify people in my database)
OleDbConnection con = new OleDbConnection();
OleDbCommand cmd = new OleDbCommand();
con.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C: \Users\Zee\Desktop\Computing\Comp\UserData.accdb";
cmd.Connection = con;
cmd.CommandText = "insert into [UserData](Username,FirstName,Surname,Email,Mobilenumber,Postcode,Password)values(" + Usernametb.Text + "," + Firsttnametb.Text + "," + Surnametb.Text + "," + Emailtb.Text + "," + Mobiletb.Text + "," + Postcodetb.Text + "," + Passwordtb.Text + ")";
}