Database Programming with FireDAC Bob Swart (aka “Dr.Bob”) Bob Swart Training & Consultancy (eBob42) Delphi Benelux 2016 Congress 26 May 2016, Eindhoven
Agenda FireDAC Architecture Monitoring and Tracing Cached Updates TFDMemTable Local SQL Migration from BDE, ADO, DBX (DataSnap)
FireDAC Architecture Universal Data Access Components TFDManager, TFDConnection TFDQuery, TFDTable, TFDStoredProc TFDMemTable TFDLocalSQL TFDPhysxxxDriverLink TFDGUIxWaitCursor
Monitoring and Tracing Monitoring DBMS connection (real-time) –FireDAC Monitor (tools menu) Tracing between FD and DBMS (log) –TFDMoniFlatFile/Remote/CustomClientLink EventKinds, ShowTraces, Tracing Remote FDMonitor Custom OnOutput event handler –TFDConnection.Params.MonitorBy
Cached Updates CachedUpdates = True –ChangeCount, Undo options –CancelUpdates / Apply/CommitUpdates UpdateOptions –UpdateMode –RefreshMode
TFDMemTable In-memory datasets –Can contain multiple datasets! Successor of TClientDataSet –No requirement for MIDAS.DLL or MidasLib Useful in DataSnap applications
Local SQL TFDLocalSQL Uses SQLite driver –TFDConnection, DriverName = SQLite –TFDPhysSQLiteDriverLink Useful for combining tables from heterogeneous databases!
Migration to FireDAC BDE Migration –TSession TFDManager –TDatabase TFDConnection –TQuery TFDQuery –TSortedProc TFDStoredProc –TTable TFDTable
Migration to FireDAC ADO Migration –TADOConnection TFDConnection –TADOQuery TFDQuery –TADOSortedProc TFDStoredProc –TADOTable TFDTable Not really necessary
Migration to FireDAC dbExpress Migration –TSQLConnection TFDConnection –TSQLQuery TFDQuery –TSQLSortedProc TFDStoredProc –TSQLTable TFDTabe –Need no TDataSetProvider + TClientDataSet is
Migration to FireDAC dbExpress DataSnap Migration –TSQLConnection TDSRestConnection –TClientDataSet TFDMemTabe –No IAppServer interface (normal data mod) –No TDataSetProvder (server side) –No TDSProviderConnection (client side) is
Questions ebob42 and drbob42ebob42drbob