下面是我的添加留言的方法
public static int addMessages(Messages messages)
{
string OleDb = "insert into messages([writer],[title],[contents],[writerTime],[revertMessage],[tel],[email],[state]) values (@writer,@title,@contents,@writerTime,@revertMessage,@tel,@email,@state)";
OleDbParameter[] sp = new OleDbParameter[]
{
new OleDbParameter("@writer",messages.Writer),
new OleDbParameter("@title",messages.Title),
new OleDbParameter("@contents",messages.Contents),
new OleDbParameter("@writerTime",messages.WriterTime),
new OleDbParameter("@revertMessage",messages.RevertMessage),
new OleDbParameter("@tel",messages.Tel),
new OleDbParameter("@email",messages.Email),
new OleDbParameter("@state",messages.State)
};
return DBHelper.ExecuteCommand(OleDb,sp);
}
但是在添加的时候说“参数@revermessage没有默认值”
是怎么回事?我看了字段也都是对应的啊
急求……