Hi guys i have to catch exception ..if suddenly occurs in my code. kindly suggest
wht to modify
protected void Button2_Click(object sender, EventArgs e)
{
string MyConString = "datasource=localhost;port=3306;username=root;password=ft";
using (MySqlConnection connection = new MySqlConnection(MyConString))
{
connection.Open();
string cmdText = "INSERT INTO filetracker.file(fileno,CreatedBy,Section_Name,Department_name,File_subject,FileSerial_no,CreatedDtTm) VALUES (@fileno, @CreatedBy, @Section_Name,@Department_name,@File_subject,@FileSerial_no,@CreatedDtTm)";
MySqlCommand cmd = new MySqlCommand(cmdText, connection);
cmd.Parameters.AddWithValue("@fileno", txtFileNo.Text);
cmd.Parameters.AddWithValue("@CreatedBy", TextBox4.Text);
c ...
Go to the complete details ...