Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Using Command ADO In Delphi

DZone's Guide to

Using Command ADO In Delphi

·
Free Resource
Usage example of TADOCommand in Delphi


function TfrmCreateEdit.UpdateBooking(dbName: TADOCommand ; tblName : string ; RecID : integer) : boolean;
begin
  Result := False;

  with dbName do begin
      CommandText := 'UPDATE ' + tblName
      + ' SET '
      + ' Title = ''' + strTitle + ''''
      + ' ,FirstName = ''' + strFirstName + ''''
      + ' ,LastName = ''' + strLastName + ''''
      + ' ,JobTitle =  ''' + strJobTitle + ''''
      + ' ,Department =  ''' + strDepartment + ''''
      + ' WHERE RecID = ' + IntToStr(RecID);

      try
         memoDebug.Text := CommandText;
         Execute;
         Result := True;
      except
         Result := False;
      end;

  end;
end;
Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}