0
String conn="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=E:\\Data.accdb";
string query = "Insert Into Venue values(@venueID,@vanueName)";
OleDbDataAdapter dAdapter = new OleDbDataAdapter(query, conn);
OleDbCommandBuilder cBuilder = new OleDbCommandBuilder(dAdapter);
DataTable dTable = new DataTable();
dTable.Rows.Add("@vanueName", textBox1.Text);
dAdapter .Fill (dTable);
dataGridView1 .DataSource =dTable ;
所以,我應該爲此做什麼, –
首先確保您通過執行ExecuteNonScalar方法更新數據庫表。 – Zenwalker
不,我仍然面臨一個問題,請你寄給我代碼,或者使我的代碼真實 –