Grid index out of range |
尚未結案
|
skp
一般會員 ![]() ![]() 發表:14 回覆:19 積分:6 註冊:2002-11-08 發送簡訊給我 |
|
領航天使
站長 ![]() ![]() ![]() ![]() ![]() ![]() 發表:12216 回覆:4186 積分:4084 註冊:2001-07-25 發送簡訊給我 |
|
skp
一般會員 ![]() ![]() 發表:14 回覆:19 積分:6 註冊:2002-11-08 發送簡訊給我 |
|
skp
一般會員 ![]() ![]() 發表:14 回覆:19 積分:6 註冊:2002-11-08 發送簡訊給我 |
我是用TMS Grid的。可不可以幫我看看以下的code, 在那里有機會出現問題。
謝謝
// AddFrom is public variable. procedure TFormInput.AddToOrder;
label
myReturn;
var
i: integer;
begin
myReturn:
if F.UseIni('Order.ini') then
begin
Application.ProcessMessages;
goto myReturn;
end else F.WriteIni('Order.ini', True);
with AdvStringGridOrder do
with TableOrder do
try
Close;
TableName := 'Order.dbf';
IndexName := 'Arrange';
Open;
DisableControls;
for i := AddRowFrom to RowCount - 2 do
begin
if strtoint(Cells[3, i]) = 0 then continue;
Append;
FieldByName('Order_No').AsInteger := _OrderNo;
FieldByName('Product_No').AsInteger := DefaultProdNo;
FieldByName('Room_No').AsString := LabelRoomNo.Caption;
FieldByName('Prod_Code').AsString := Cells[1, i];
FieldByName('Prod_Desc').AsString := Cells[2, i];
FieldByName('FQ').AsInteger := strtoint(Cells[6, i]);
FieldByName('FF').AsString := Cells[7, i];
FieldByName('Staff').AsString := Staff;
FieldByName('Arrange').AsInteger := strtoint(Cells[8, i]);
FieldByName('Category').AsString := Cells[9, i];
FieldByName('Quantity').AsString := Cells[3, i];
FieldByName('Price').AsFloat := strtofloat(Cells[4, i]);
FieldByName('Type').AsString := Cells[10, i];
FieldByName('Ser_charge').AsString := Cells[11, i];
FieldByName('OD_Time').AsString := Cells[5, i];
FieldByName('PNTType').AsString := Cells[12, i];
FieldByName('Dis_flag').AsString := Cells[13, i];
Post;
SetProdNo(TableOrder);
end;
finally
F.WriteIni('Order.ini', False);
EnableControls;
Close;
end;
end;
|
hagar
版主 ![]() ![]() ![]() ![]() ![]() ![]() 發表:143 回覆:4056 積分:4445 註冊:2002-04-14 發送簡訊給我 |
|
skp
一般會員 ![]() ![]() 發表:14 回覆:19 積分:6 註冊:2002-11-08 發送簡訊給我 |
|
skp
一般會員 ![]() ![]() 發表:14 回覆:19 積分:6 註冊:2002-11-08 發送簡訊給我 |
|
領航天使
站長 ![]() ![]() ![]() ![]() ![]() ![]() 發表:12216 回覆:4186 積分:4084 註冊:2001-07-25 發送簡訊給我 |
|
A022
一般會員 ![]() ![]() 發表:18 回覆:29 積分:9 註冊:2002-06-21 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |