帮忙看下错出在哪里?
时间:2011-10-26
来源:互联网
Delphi(Pascal) code
procedure TFormSetSystem.btnConfigClick(Sender: TObject); var sqlstr: string; begin with qryConfigExec do begin sqlstr :='UPDATE SetConfig SET '+ 'Byte1Bit0 = : Byte1Bit0,'+ 'Byte1Bit1 = : Byte1Bit1,'+ 'Byte1Bit2 = : Byte1Bit2,'+ 'Byte1Bit3 = : Byte1Bit3,'+ 'Byte1Bit4 = : Byte1Bit4,'+ 'Byte1Bit5 = : Byte1Bit5,'+ 'Byte1Bit6 = : Byte1Bit6,'+ 'Byte1Bit7 = : Byte1Bit7,'+ 'Byte2Bit0 = : Byte2Bit0,'+ 'Byte2Bit1 = : Byte2Bit1,'+ 'Byte2Bit2 = : Byte2Bit2,'+ 'Byte2Bit3 = : Byte2Bit3,'+ 'Byte2Bit4 = : Byte2Bit4,'+ 'Byte2Bit5 = : Byte2Bit5,'+ 'Byte2Bit6 = : Byte2Bit6,'+ 'Byte2Bit7 = : Byte2Bit7 '+ 'WHERE ConfigID = '''+edt1.Text+''''; Close; SQL.Clear; SQL.Add(sqlstr); Parameters[0].Value := cbbByte1Bit0.ItemIndex; Parameters[1].Value := cbbByte1Bit1.ItemIndex; Parameters[2].Value := cbbByte1Bit2.ItemIndex; Parameters[3].Value := cbbByte1Bit3.ItemIndex; Parameters[4].Value := cbbByte1Bit4.ItemIndex; Parameters[5].Value := cbbByte1Bit5.ItemIndex; Parameters[6].Value := cbbByte1Bit6.ItemIndex; Parameters[7].Value := cbbByte1Bit7.ItemIndex; Parameters[8].Value := cbbByte2Bit0.ItemIndex; Parameters[9].Value := cbbByte2Bit1.ItemIndex; Parameters[10].Value := cbbByte2Bit2.ItemIndex; Parameters[11].Value := cbbByte2Bit3.ItemIndex; Parameters[12].Value := cbbByte2Bit4.ItemIndex; Parameters[13].Value := cbbByte2Bit5.ItemIndex; Parameters[14].Value := cbbByte2Bit6.ItemIndex; Parameters[15].Value := cbbByte2Bit7.ItemIndex; try ShowMessage(qryConfigExec.SQL.Text); ExecSQL; with qryConfigShow do begin Close; Open; end; MessageBox(Handle, PChar('修改项目配置成功'), '提示信息', MB_OK + MB_ICONWARNING); except MessageBox(Handle, PChar('修改项目配置失败'), '提示信息', MB_OK + MB_ICONWARNING); end; end; end;
作者: C330319612 发布时间: 2011-10-26
错误提示呢哦?!
作者: case5166 发布时间: 2011-10-26
: Byte1Bit0
冒号与Byte1Bit0之间不能有空格,下面相似语句同样的道理。
冒号与Byte1Bit0之间不能有空格,下面相似语句同样的道理。
作者: Oraclers 发布时间: 2011-10-26
用的两个QUERY 怎么只有一个open呢,没有看太明白楼上的意思 错误提示是什么呢
作者: delphilrj 发布时间: 2011-10-26
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28