检查数据库字段设置是否是Ole,保存方法改为
OleDbConnection myConnection = new OleDbConnection(strCnn);
OleDbCommand command = new OleDbCommand("INSERT INTO Person (PersonName,PersonEmail,PersonSex,PersonImageType,PersonImage)" +
"VALUES (@PersonName,@PersonEmail,@PersonSex,@PersonImageType,@PersonImage)", myConnection); command.Parameters.AddWithValue("@PersonName",TextBox1.Text);
command.Parameters.AddWithValue("@PersonEmail", "[email protected]");
command.Parameters.AddWithValue("@paramPersonSex", "男");
command.Parameters.AddWithValue("@PersonImageType", fileType);
command.Parameters.AddWithValue("@PersonImage", fileData);
OleDbConnection myConnection = new OleDbConnection(strCnn);
OleDbCommand command = new OleDbCommand("INSERT INTO Person (PersonName,PersonEmail,PersonSex,PersonImageType,PersonImage)" +
"VALUES (@PersonName,@PersonEmail,@PersonSex,@PersonImageType,@PersonImage)", myConnection); command.Parameters.AddWithValue("@PersonName",TextBox1.Text);
command.Parameters.AddWithValue("@PersonEmail", "[email protected]");
command.Parameters.AddWithValue("@paramPersonSex", "男");
command.Parameters.AddWithValue("@PersonImageType", fileType);
command.Parameters.AddWithValue("@PersonImage", fileData);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货