又是一个关于access数据类型不匹配的问题
代码如下:
public void InsertWord(Messagebook mBook)
{
OleDbParameter[] op ={new OleDbParameter( "@gname ",mBook.GName),
new OleDbParameter( "@gphone ",mBook.GPhone),
new OleDbParameter( "@address ",mBook.GAddress),
new OleDbParameter( "@gmail ",mBook.GEmail),
new OleDbParameter( "@gqq ",mBook.GQq),
new OleDbParameter( "@gtitle ",mBook.GTitle),
new OleDbParameter( "@gcontent ",mBook.GContent),
new OleDbParameter( "@gdate ",mBook.GDate),
new OleDbParameter( "@gshow ",mBook.Gshow),
new OleDbParameter( "@gip ",mBook.GIp)
};
DB.ExecuteNonQuery( "insert into guestbook(gName,gPhone,gaddress,geMail,gQq,gTitle,gContent,gDate,gShow,gIp) values(@gname,@gphone,@gaddress,@gmail,@gqq,@gtitle,@gcontent,@gdate,@gshow,@gip) ", op);
}
代码二
public int ExecuteNonQuery(string sqlString,OleDbParameter[] op)
{
int ret = 0;
Com.CommandText = sqlString;
&nb