Тема: Delphi,Access...
Показать сообщение отдельно
Старый 02.03.2006, 01:10     # 25
kilroy
Guest
 
Сообщения: n/a

Код:
procedure TForm1.Button8Click(Sender: TObject);
begin
  With ADOTable1 do
 begin
 Open;
 First;
 Edit;
 FieldByName('imya').AsString :=Label1.Caption;


Post;
вот этот код надо как то привратить вот в этот

Код:
begin
 stringGrid1.RowCount := 0;


    FileAttrs := FileAttrs + faAnyFile;

  with stringGrid1 do
  begin
    RowCount := 1;
    dir:=  Label1.Caption;
     if FindFirst( dir+'\*.txt',  FileAttrs, sr) =0

       then

    begin
      repeat
        if (sr.Attr and FileAttrs) = sr.Attr then
        begin
        RowCount := RowCount + 1;
        Cells[0,RowCount-1] := sr.name;
        Cells[1,RowCount-1] := IntToStr(sr.size);
         Cells[2,RowCount-1] := IntToStr(sr.time);
         Cells[3,RowCount-1] := Label1.Caption +sr.name;
        end;
      until FindNext(sr) <> 0;
      FindClose(sr);
      end;
Т.е. тоже сделать цикл...чтоб данные записывались не в StringGrid1 а сразу непосредственно в БД(Access).