3
public partial class EnterData : Form
{
OleDbConnection myconn=new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\Buddiez\Documents\Visual Studio 2010\Projects\working with databse\working with databse\database.accdb");
public EnterData()
{
InitializeComponent();
}
private void EnterData_Load(object sender, EventArgs e)
{
}
private void btn_Save_Click(object sender, EventArgs e)
{
string connString = string.Format("insert into test_database values('{0}','{1}','{2}','{3}','{4}')", Convert.ToInt32(txtsno.Text), txtName.Text, Convert.ToInt32(txtage.Text), txtBackground.Text, txtAddress.Text);
OleDbCommand myConn = new OleDbCommand(connString, myconn);
try
{
myconn.Open();
myConn.ExecuteNonQuery();
MessageBox.Show("Entry Updated");
myconn.Dispose();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
我已經配置了配置管理器的任何CPU甚至比IM面臨同樣的問題Microsoft.ACE.OLEDB.12.0沒有被註冊到本地機器..引導我..Microsoft.ACE.OLEDB.12.0沒有被註冊到本地機器
感謝名單我知道了// – rummykhan 2013-03-20 16:23:35