我已經編寫了一個代碼來完成上述任務。沒有錯誤,但訪問數據庫沒有得到更新。使用c#表單應用程序更新Access數據庫
private void button1_Click(object sender, EventArgs e)
{
OleDbConnection mycon = new OleDbConnection();
mycon.ConnectionString [email protected]"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Dinesh\C#\GIS_Power\WindowsFormsApplication1\bin\Power_DB1";
OleDbCommand command = new OleDbCommand();
command.CommandText = "INSERT INTO Table1 (Emp_ID,Asset_ID)VALUES('" + textBox1.Text + "','" + textBox2.Text + "')";
}
謝謝。問題解決了。感謝所有.. – user3219362
在這種情況下,率將非常感激:) – Nil23