X
xinyang
Unregistered / Unconfirmed
GUEST, unregistred user!
BASE:=14;<br>With ADOQuery1 do<br> begin<br> Close;<br> SQL.Clear;<br> SQLCOMMAND:='Insert into Trade (Com_No,TID,ASN,RECKIND,AMOUNT,TTC,DATE,CTC,BALANCE,TAC,YG,OILNO,GUNNO,PPU,VOLUME,PT,PKEYINFO,GTC,MAC,VER,Rec_Time) Values P1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,P21)';<br> SQL.Add(SQLCOMMAND);<br> parameters[0].Value :=IntToHex(RecComm_No,2);<br> parameters[1].Value := copy(Temp_Str,BASE+1,12); parameters[2].Value :=copy(Temp_Str,BASE+13,20); <br>parameters[3].Value :=copy(Temp_Str,BASE+33,2); <br>parameters[4].Value :=copy(Temp_Str,BASE+35,8);<br> parameters[5].Value :=copy(Temp_Str,BASE+43,8);<br> parameters[6].Value :=copy(Temp_Str,BASE+51,14);<br> parameters[7].Value :=copy(Temp_Str,BASE+65,4);<br> parameters[8].Value :=copy(Temp_Str,BASE+69,8);<br> parameters[9].Value :=copy(Temp_Str,BASE+77,8);<br> parameters[10].Value :=copy(Temp_Str,BASE+85,2); <br> parameters[11].Value :=copy(Temp_Str,BASE+87,2); <br> parameters[12].Value :=copy(Temp_Str,BASE+89,2); <br> parameters[13].Value :=copy(Temp_Str,BASE+91,4); <br> parameters[14].Value :=copy(Temp_Str,BASE+95,6); <br> parameters[15].Value :=copy(Temp_Str,BASE+101,8);<br> parameters[16].Value :=copy(Temp_Str,BASE+109,2);<br> parameters[17].Value :=copy(Temp_Str,BASE+111,4);<br> parameters[18].Value :=copy(Temp_Str,BASE+115,8);<br> parameters[19].Value :=copy(Temp_Str,BASE+123,2);<br> parameters[20].Value:=formatdatetime('yyyymmddhhmmss', now);<br> Prepared;<br> ExecSQL;<br>报 list index out of bounds(20) 错,请问是哪里出错了,真晕!