Delphi Pages Forums

Delphi Pages Forums (http://www.delphipages.com/forum/index.php)
-   DB Tools (http://www.delphipages.com/forum/forumdisplay.php?f=7)
-   -   stringgrid to dbgrid(adotable) (http://www.delphipages.com/forum/showthread.php?t=217185)

dantap 05-18-2015 12:42 PM

stringgrid to dbgrid(adotable)
 
Hello
I'm trying to fill a dbgrid from a stringgrid but I can't get the result
I hope you can help me
Thanks
Dan

This is my code:

procedure TForm1.Button2Click(Sender: TObject);
var
r, c : integer;
begin
c := 0 - 1;
for r := 1 to SG1.RowCount - 1 do
begin
ADOTable1.Append;
ADOTable1.FieldByName(ADOTable1.Fields [r].FieldName).AsString := SG1.Cells[c+1, r+1];// here tagid assigned to tagid field
ADOTable1.Post;
end;
end;


All times are GMT. The time now is 05:00 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.