CIS407A Final
Need these two done within 2 hours.
Question 3515 pts
(TCO 5, 6, 9) 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
p
Flag this QuestionQuestion 3615 pts
(TCO 8, 9) Explain Secure Sockets Layer, authentication, and authorization. Discuss advantages of using validation controls and discuss the RequiredFieldValidator and the RegularExpressionValidator in particular.
HTML EditorKeyboard Shortcuts
12pt
Paragraph
8 years ago 10
- online blaw201 exam
- Unit 5 Discussion Accounting
- What is an example of a marketing mix that has a high price level but you see it as having good value? Explain in detail what makes it a good value.
- need help with this homework asap
- Exam - Requires Respondus LockDown Browser( Sport Marketing).
- annual report project for NESTLE COMPANY
- Healthcare Resource
- Deductive and Inductive Arguments
- e-commerce
- How are new technologies affecting OSINT collection and analysis? What potential vulnerabilities does a social media network present? Define Social Media Intelligence....