此主题相关图片如下:qq截图20160109153210.png
点击Button3控件时出现操作数类型冲突:image与nvarchar不兼容,以下代码哪里错了?
If Tables("wztz").Current Is Nothing Then
Return
End If
Dim dr As DataRow = Tables("wztz").Current.DataRow
Dim dlg As New OpenFileDialog
dlg.Filter = "图形文件|*.bmp;*.jpg;*.gif;*.png"
If dlg.ShowDialog = DialogResult.OK Then
dr.SQLInsertFile("wzzp",dlg.FileName) '插入文件
Dim pic As WinForm.PictureBox = e.Form.Controls("PictureBox1")
pic.Image = GetImage(dlg.FileName)
End If
还有我想点击[保存]控件时把图片同时保存在“wzzp"单元格内,应该如何编写代码?
If e.Form.Controls("ComboBox1").Text = "" Then
MessageBox.Show("车牌颜色不能为空")
Return
End If
Tables("wztz").AddNew()
Tables("clxx").AddNew()
Tables("wztz").current("dwjbqh_dwmc")=e.Form.Controls("TextBox2").text
Tables("wztz").current("dwjbqh_dwdz")=e.Form.Controls("TextBox3").text
Tables("wztz").current("dwjbqh_lxdh")=e.Form.Controls("TextBox4").text
Tables("wztz").current("dwjbqh_yzbm")=e.Form.Controls("TextBox5").text
Tables("wztz").current("cljbqh_cphm")=e.Form.Controls("TextBox6").text
Tables("clxx").current("clhm")=e.Form.Controls("TextBox6").text
Tables("wztz").current("cljbqh_cpys")=e.Form.Controls("ComboBox1").text
Tables("clxx").current("cpys")=e.Form.Controls("ComboBox1").text
Tables("clxx").current("xlqh_qd")=e.Form.Controls("TextBox7").text
Tables("clxx").current("xlqh_zd")=e.Form.Controls("TextBox10").text
Tables("clxx").current("xltjd")=e.Form.Controls("TextBox11").text
Tables("wztz").current("wzjbqh_wzxw")=e.Form.Controls("ComboBox2").text
Tables("wztz").current("wzjbqh_wzdd")=e.Form.Controls("ComboBox3").text
Tables("wztz").current("wzjbqh_wzsj")=e.Form.Controls("DateTimePicker1").text
Tables("wztz").current("clhj")=e.Form.Controls("ComboBox4").text
Tables("wztz").current("yjbm")=e.Form.Controls("ComboBox5").text
Tables("wztz").current("ajly")=e.Form.Controls("ComboBox6").text
Tables("wztz").current("cfqh_ajzt")=e.Form.Controls("ComboBox7").text
Tables("wztz").current("cfqh_xfje")=e.Form.Controls("TextBox8").text
Tables("wztz").current("clfs")=e.Form.Controls("ComboBox8").text
Tables("wztz").current("wzzp")=e.Form.Controls("PictureBox1").text
DataTables("wztz").Save()
DataTables("clxx").Save()
DataTables("wztz").ReplaceFor("_Locked",True,"")
DataTables("clxx").ReplaceFor("_Locked",True,"")
请大侠们指教,谢谢
[此贴子已经被作者于2016/1/9 15:44:02编辑过]