在对mysql数据库操作的时候总是不能插入datatable内对应数据。
部分代码:
        protected void UpdateData(MySql.Data.MySqlClient.MySqlDataAdapter sda, DataTable dt)
{         
sda.Update(dt);
}
其中dt包含id和DBstring两个字段 。
this.sqlInsertCommand1.CommandText = @"INSERT INTO wfhy_test
(DBstring) 
VALUES (@DBstring); 
            SELECT id,DBstring FROM wfhy_test WHERE (id = @@IDENTITY)";
this.sqlInsertCommand1.Connection = this.conn;             
this.sqlInsertCommand1.Parameters.Add(new MySql.Data.MySqlClient.MySqlParameter("@id", MySql.Data.MySqlClient.MySqlDbType.Int32, 100, "id"));
            this.sqlInsertCommand1.Parameters.Add(new MySql.Data.MySqlClient.MySqlParameter("@DBstring", MySql.Data.MySqlClient.MySqlDbType.VarChar, 200, "DBstring"));
奇怪的问题是插入数据库的时候@DBstring就是不能获取到值。
请高手帮助