Addition of the Dynamic records
<p>i want to add the records into the MS access database from the form which i have created, and display that records into the datagridview.. for inserting the records i have the following code,</p>

<pre><code>{
        OleDbConnection con = new OleDbConnection();
        string constring = @"Provider = microsoft.jet.oledb.4.0;" + @"data source = c:\\Users\\logicwaves\\My Documents\\tbl_company.mdb";
        con.ConnectionString = constring;
        con.Open();
        StringBuilder stb = new StringBuilder();
        stb.Append("Insert into tbl_company(cmny_name, cmny_location,cmny_phn ) ");
        stb.Append("Values('@cmny_name','@cmny_location','@cmny_phn')");
        OleDbCommand cmd = con.CreateCommand();
        cmd.CommandText = stb.ToString();
        cmd.CommandType = CommandType.Text;
        cmd.ExecuteNonQuery();
        cmd.Dispose();
        con.Close();
}
</code></pre>

<p>but at "cmd.ExecuteNonQuery();" it is giving the error that "OleDbException was handled"...can any one tell me that how should i overcome from this problem?</p>
