Home > Back-end >  Delphi run found list index out of bound (17)
Delphi run found list index out of bound (17)

Time:09-20

I write a database query display program, display with dbgrideh (multiple-choice functions), after each time you run the program, when querying data through different conditions 5-6 times, will be in ado1. Close; It appears the list index out of bound (17) error, to run the program and then can query, increased DBGrideh1. Columns. The clear; Can check a few times more, but will prompt the error above, online to find the reason, I have is dbgrideh problem, changed many times, but I couldn't find a solution, any player can help me have a look,
 

DBGrideh1. Columns. The clear;
If rb1. Checked=true then//conditions all met
The begin
Sele:='and';
End
Else if rb2’s much-publicised. Checked=true then//one of the conditions to meet
The begin
Sele:='or';
end;



If srb101. Checked=true then SQLSTR:=SQLSTR + '+ sele +' useful=' 'rain' ';
If srb102. Checked=true then SQLSTR:=SQLSTR + '+ sele +' useful=' 'snow' ';
If srb103. Checked=true then SQLSTR:=SQLSTR + '+ sele +' useful=' 'cold' ' '.
If srb104. Checked=true then SQLSTR:=SQLSTR + '+ sele +' useful=' 'winds'';
If srb105. Checked=true then SQLSTR:=SQLSTR + '+ sele +' useful=' 'hail' ';
If srb106. Checked=true then SQLSTR:=SQLSTR + '+ sele +' useful=' 'heat' ' ';

If srb201. Checked then//torrential rain
The begin
If scb201. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56172 & gt; 49.9 ';
If scb202. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56079 & gt; 49.9 ';
If scb203. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56097 & gt; 49.9 ';
If scb204. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56171 & gt; 49.9 ';
If scb205. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56164 & gt; 49.9 ';
If scb206. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56173 & gt; 49.9 ';
If scb207. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56182 & gt; 49.9 ';
If scb208. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56185 & gt; 49.9 ';
If scb209. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56168 & gt; 49.9 ';
If scb210. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56178 & gt; 49.9 ';
If scb211. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56180 & gt; 49.9 ';
If scb212. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56183 & gt; 49.9 ';
If scb213. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56184 & gt; 49.9 ';
End
Else if (srb206 Checked) and (srb301. Checked) then/strong/province standard high temperature
The begin
If scb201. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56172 & gt; 36.9 ';
If scb202. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56079 & gt; 36.9 ';
If scb203. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56097 & gt; 36.9 ';
If scb204. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56171 & gt; 36.9 ';
If scb205. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56164 & gt; 36.9 ';
If scb206. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56173 & gt; 36.9 ';
If scb207. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56182 & gt; 36.9 ';
If scb208. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56185 & gt; 36.9 ';
If scb209. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56168 & gt; 36.9 ';
If scb210. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56178 & gt; 36.9 ';
If scb211. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56180 & gt; 36.9 ';
If scb212. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56183 & gt; 36.9 ';
If scb213. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56184 & gt; 36.9 ';
End
Else if (srb206 Checked) and (srb301. Checked) then/strong/gb high temperature
The begin
If scb201. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56172 & gt; 40 ';
If scb202. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56079 & gt; 40 ';
If scb203. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56097 & gt; 40 ';
If scb204. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56171 & gt; 40 ';
If scb205. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56164 & gt; 40 ';
If scb206. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56173 & gt; 40 ';
If scb207. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56182 & gt; 40 ';
If scb208. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56185 & gt; 40 ';
If scb209. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56168 & gt; 40 ';
If scb210. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56178 & gt; 40 ';
If scb211. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56180 & gt; 40 ';
If scb212. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56183 & gt; 40 ';
If scb213. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56184 & gt; 40 ';
End
The else
The begin
If scb201. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56172 & gt; 0 '.
If scb202. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56079 & gt; 0 '.
If scb203. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56097 & gt; 0 '.
If scb204. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56171 & gt; 0 '.
If scb205. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56164 & gt; 0 '.
If scb206. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56173 & gt; 0 '.
If scb207. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56182 & gt; 0 '.
If scb208. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56185 & gt; 0 '.
If scb209. Checked=true then SQLSTR:=SQLSTR + ' '+ sele + A56168 & gt; 0 '.
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related