Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > DB Tools

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 05-18-2015, 12:42 PM
dantap dantap is offline
Junior Member
 
Join Date: May 2015
Posts: 1
Default 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;
Reply With Quote
Reply

Tags
adotable, dbgrid, fill, load, stringgrid

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:46 AM.


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