Discuss advantages of using validation controls and discuss


Question 1

Discuss the importance of implementing transactions in web applications. Describe the COMMIT, and ROLLBACK command. In the following SaveEmployee function below, add code to insert the first name, last name, and pay rate into the tblEmployee table. In the database the column names are: FirstName, LastName, PayRate. Also, write the code to commit the transaction.

public static bool SaveEmployee(string Database, string FirstName, string LastName, string PayRate)
{
bool recordSaved;
try
{
OleDbTransaction myTransaction = null;
OleDbConnection conn = new OleDbConnection("PROVIDER=Microsoft.ACE.OLEDB.12.0;" +"Data Source=" +Database);
conn.Open();
OleDbCommand command = conn.CreateCommand();
string strSQL;

myTransaction = conn.BeginTransaction();
command.Transaction = myTransaction;

// Write the code below to insert the first name, last name, and pay rate into the tblEmployee table
_____________________________________________________

// Add your comments here
command.CommandType = CommandType.Text;
command.CommandText = strSQL;

// Add your comments here
command.ExecuteNonQuery();

// Write the code below to commit the transaction
_______________________________________________________

// Add your comments here
conn.Close();

recordSaved = true;
}
catch (Exception ex)
{
myTransaction.Rollback();

recordSaved = false;
}

return recordSaved;

}

HTML EditorKeyboard Shortcuts

12pt

Paragraph

Question 2

Explain Secure Sockets Layer, authentication, and authorization. Discuss advantages of using validation controls and discuss the RequiredFieldValidator and the RegularExpressionValidator in particular.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Discuss advantages of using validation controls and discuss
Reference No:- TGS02556790

Expected delivery within 24 Hours