调用时参数错误了.
Set rs = getrs("strsql")
txtname.Text = rs("name")——————>这句出问题了,错误如题目所示!
txtdepartnum.Text = rs("department")
strsql1 = "select name from department where id='" &rs("department") &"'"
Set rs1 = getrs("strsql1")
把这上面中getrs的参数上的引号去掉:
set rs=getrs(strsql)
......
set rs=getrs(strsql1)
"select materialName as 材料名称, materialHD as 焊件厚度,weldMethod as 焊接方法,htDiameter as 焊条直径,hsDiameter as 焊丝直径,wjDiameter as 钨极直径,weldElec as 焊接电流,arcVolt as 电弧电压,weldspeed as 焊接速度,gasFlow as 气体流量,dyPosition as 电源极性,yrTemp as 预热温度,yuTime as 预热时间 from gycard "这句中,你把所有的字段都改名了,Fields("wjDiameter") 之类的当然找不到项了,把Select语句中所有的as子句全部去掉。或者把Fields("wjDiameter") 之类的改成Fields("钨极直径")
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)