Delphi XE data access with ADO

Step 1.
Open new project


Step 2.
Insert ADO connection object and ADO table object (rename with your table name)
build the database connection with ADO connection

Step 3.
Add button and and edit box



Step 4.
double click on button and copy below codes

var aa:string;
begin
aa := 'SELECT * FROM Tablename ';
  with tablename do
  begin
    Active := False;
    SQL.Clear;
    SQL.Add(aa);
    ExecSQL;
  end;
  tablename.Open;
  edit1.Text := Tablename.FieldByName('fieldname').AsString;
end;


Comments

Popular posts from this blog

Delphi stringgrid Sample (Using for loop)

Reports Fast Report Delphi Example

How to save jpg image to database and then load it in Delphi using FIBplus and TImage?