首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

帮忙看下错出在哪里?解决办法

2012-03-28 
帮忙看下错出在哪里?Delphi(Pascal) codeprocedure TFormSetSystem.btnConfigClick(Sender: TObject)vars

帮忙看下错出在哪里?

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;


[解决办法]
: Byte1Bit0
冒号与Byte1Bit0之间不能有空格,下面相似语句同样的道理。

热点排行