也就是向数据库中添加一条记录。请指教,谢谢。DataSet Ds = new DataSet();
using (SqlConnection Conn = new SqlConnection("server=.;uid=sa;pwd=1234;database=dbtemp"))
{
SqlCommand Cmd = new SqlCommand();
Cmd.CommandText = "sql 语句";
Cmd.Connection = Conn;
Conn.Open();
Cmd.ExecuteNonQuery();
}
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\bin\LocalAccess40.mdb");
OleDbCommand cmd = new OleDbCommand();
cmd.Connection = conn;
cmd.CommandText = "SQL 语句";
conn.Open();
cmd.ExecuteNonQuery();
conn.Close();
[c引用
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\bin\LocalAccess40.mdb");
OleDbCommand cmd = new O