ここでスクリーンショットを取得できます" http://i.imgur.com/9K5WPVw.png "
namespace session
{
public class Broker
{
OleDbConnection connection;
OleDbCommand command;
private void connectto()
{
connection = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\Tech Geek\Documents\Visual Studio 2012\WindowsFormsApplication8\Database.accdb;Persist Security Info=False");
command = new OleDbCommand();
}
public Broker()
{
connectto();
}
public void Insert(person p)
{
try
{
command.CommandText = "INSERT INTO n_account(customerid, sponsorname, applicantname, fatherhusbandsname, nomineename, applicantdob, nomineedob, houseno, state, district, tehsil, post,city, pincode, contactno, idprooftype, addressprooftype, panno, ammount, months, maturitydate, maturityfund, lastpremiumpaid) VALUES('" + p.Customerid + "','" + p.Sponsorname + "','" + p.Applicantname + "','" + p.Fatherhusbandsname + "','" + p.Nomineename + "','" + p.Applicantdob + "','" + p.Nomineedob + "','" + p.Houseno + "','" + p.State + "','" + p.District + "','" + p.Tehsil + "','" + p.Post + "','" + p.City + "','" + p.Pincode + "','" + p.Contactno + "','" + p.Idprooftype + "','" + p.Addressprooftype + "','" + p.Panno + "','" + p.Ammount + "','" + p.Months + "','" + p.Maturitydate + "','" + p.Maturityfund + "','" + p.Lastpremiumpaid + "')";
command.CommandType = CommandType.Text;
connection.Open();
command.ExecuteNonQuery();
}
catch (Exception)
{
throw;
}
finally
{
if (connection != null)
{
connection.Close();
}
}
}
}
}
助けてください
エラーのスクリーンショットも添付しました。別のプログラムで同じコードを使用しました-それは正常に機能しています。これで何が起こったのかわかりません。