ech załamka
- opcja z Query (pole_num_1, pole_num_2, pole_num_3 to NAZWY pól, które Cię interesują)
var
ar: array of array of Integer;
i, j : Integer;
begin
i := 0;
with Query do
begin
SQL.Text := 'SELECT pole_num_1, pole_num_2, pole_num_3 FROM tabela';
Open;
First;
SetLength(ar, RecordCount, Fields.Count);
while not EoF do
begin
for j := 0 to Fields.Count - 1 do
ar[i, j] := Fields[j].AsInteger;
Next;
Inc(i);
end;
end;
end;
- opcja z Table (pole_num_1, pole_num_2, pole_num_3 to NUMERY pól, które Cię interesują)
const
Pola: array[1..3] of Byte = (pole_num_1, pole_num_2, pole_num_3);
var
ar: array of array[1..3] of Integer;
i, j : Integer;
begin
i := 0;
with Table do
begin
Open;
First;
SetLength(ar, RecordCount);
while not EoF do
begin
for j := 1 to 3 do
ar[i, j] := Fields[Pola[j]].AsInteger;
Next;
Inc(i);
end;
end;
end;
- opcja z Table (klikasz dwa razy na Table, potem prawy i AddFields i zaznaczasz tylko te, które Cię interesują)
var
ar: array of array of Integer;
i, j : Integer;
begin
i := 0;
with Table do
begin
Open;
First;
SetLength(ar, RecordCount, Fields.Count);
while not EoF do
begin
for j := 0 to Fields.Count - 1 do
ar[i, j] := Fields[j].AsInteger;
Next;
Inc(i);
end;
end;
end;
takie to trudne?????
a jak Ci bzdury wychodzą to sprawdz co masz w tabelach, co przekazujesz do funkcji i co te funkcje robią. Nikt nie zrobi tego za Ciebie