DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Using Command ADO In Delphi
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;





