string updatesql="update shuju set 时间='"+this.textBox1.Text+"',"
+"电压="+this.textBox2.Text+",电流="+this.textBox3.Text+","
+"水压="+this.textBox4.Text+",水位="+this.textBox5.Text+","
+"温度="+this.textBox6.Text+","
+"湿度="+this.textBox7.Text+",气压="+this.textBox8.Text+","
+"海拔="+this.textBox9.Text+" "
+"where 井号="+this.comboBox3.Text+" and "
+"日期='"+this.dateTimePicker3.Value.ToShortDateString()+"'";
我要按日期和井号来更新一条记录,ACCESS数据库,日期字段为”日期/时间“格式的短日期,可运行程序后出错说我字段类型不匹配。
+"日期='"+this.dateTimePicker3.Value.ToShortDateString()+"'"应该写成什么?
+"电压="+this.textBox2.Text+",电流="+this.textBox3.Text+","
+"水压="+this.textBox4.Text+",水位="+this.textBox5.Text+","
+"温度="+this.textBox6.Text+","
+"湿度="+this.textBox7.Text+",气压="+this.textBox8.Text+","
+"海拔="+this.textBox9.Text+" "
+"where 井号="+this.comboBox3.Text+" and "
+"日期='"+this.dateTimePicker3.Value.ToShortDateString()+"'";
我要按日期和井号来更新一条记录,ACCESS数据库,日期字段为”日期/时间“格式的短日期,可运行程序后出错说我字段类型不匹配。
+"日期='"+this.dateTimePicker3.Value.ToShortDateString()+"'"应该写成什么?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货