Introduction and overview to using the disconnected FireDAC in-memory dataset: TFDMemTable. It works across all platforms: Android, iOS, Windows, OS X and languages: Object Pascal/Delphi and C++. The TFDMemTable provides much of the same functionality as the TClientDataSet but is available in Professional and up skews of RAD Studio and Appmethod.
For more information: http://delphi.org/?p=1933
2. EMBARCADERO
TECHNOLOGIES
This
Skill
Sprint
Works
with
.
.
.
• Windows
• Mac
OS
X
• Android
• iOS
• RAD
Studio
• Appmethod
• Object
Pascal
• C++
• RAD
Studio
XE7
DocWiki
– http://embt.co/latestdocwiki
– http://docwiki.embarcadero.com/RADStudio/en/
• Appmethod
September
2014
DocWiki
– http://embt.co/AppmethodTopics
– http://docwiki.appmethod.com/appmethod/topics/en/
• Appmethod
supports
the
FireMonkey
framework
on
all
4
platforms
while
RAD
Studio,
Delphi
and
C++Builder
also
support
VCL
on
Windows.
Contact
sales
with
any
questions!
3. EMBARCADERO
TECHNOLOGIES
TFDMemTable
the
Disconnected/In-‐Memory
DataSet
• Design
time
&
Runtime
persistence
functions:
• Load
File,
Save
File
&
Assign
Data
• Streaming
for
multi-‐tier
applications
• Used
with
REST
client
components,
DataSnap,
etc.
• Combine
with
Local
SQL
for
simple
query
operations
• Use
with
ETL
for
other
data
sources
(plain
text,
csv,
etc.)
4. EMBARCADERO
TECHNOLOGIES
Stream
and
File
Formats
(TFDStorageFormat)
• sfAuto
• Based
on
file
extension
or
binary
• sfBinary
(uses
FireDAC.Stan.StorageBin)
• Most
efficient
-‐
Signature:
“ADBS”
• sfXML
(uses
FireDAC.Stan.StorageXML)
• <FDBS
Version="14">...
• sfJSON
(uses
FireDAC.Stan.StorageJSON)
• {"FDBS":{"Version":14,
…
4 Image
by
Shane
Porter
-‐
Used
under
Creative
Commons
https://commons.wikimedia.org/wiki/File:Jeongbang_Waterfall.jpg
Binary
JSON
XML
5. EMBARCADERO
TECHNOLOGIES
Common
Code
Samples
//
Create
Field
Definitions
FDMemTable1.FieldDefs.Add('ID',
ftInteger,
0,
False);
FDMemTable1.FieldDefs.Add('Name',
ftString,
20,
False);
FDMemTable1.CreateDataSet;
//
Append
data
FDMemTable1.Open;
FDMemTable1.AppendRecord([1,
'Jim']);
//
Load
from
another
DataSet
FDMemTable1.CopyDataSet(DataSet1,
[coStructure,
coRestart,
coAppend]);
OP
6. EMBARCADERO
TECHNOLOGIES
Common
Code
Samples
//
Create
Field
Definitions
FDMemTable1-‐>FieldDefs-‐>Add("ID",
ftInteger,
0,
False);
FDMemTable1-‐>FieldDefs-‐>Add("Name",
ftString,
20,
False);
FDMemTable1-‐>CreateDataSet();
//
Append
Data
FDMemTable1-‐>Open();
FDMemTable1-‐>Append();
FDMemTable1-‐>FieldByName("ID")-‐>AsInteger
=
1;
FDMemTable1-‐>FieldByName("Name")-‐>AsString
=
"Jim";
FDMemTable1-‐>Post();
//
Load
from
another
DataSet
FDMemTable1-‐>CopyDataSet(DataSet1,
TFDCopyDataSetOptions()
<<
coStructure
<<
coRestart
<<
coAppend);
C++
10. EMBARCADERO
TECHNOLOGIES
Next
Time….
• Preview:
EMS
Push
Notifications
• Sneak
peak
from
a
future
release
• Push
notifications
via
EMS
Server
• Tuesday
the
10th
of
March
– 6AM
San
Francisco
/
9AM
New
York
/
1PM
London
/
2PM
Milan
/
13
UTC
– 11AM
San
Francisco
/
2PM
New
York
/
6PM
London
/
7PM
Milan
/
18
UTC
– 5PM
San
Francisco
/
Wed
9AM
Tokyo
/
Wed
11AM
Sydney
/
0
UTC
Sign-‐up:
http://www.embarcadero.com/landing-‐pages/skill-‐sprints
11. EMBARCADERO
TECHNOLOGIES
Next
Time….
• FireDAC:
Local
SQL
• Execute
SQL
on
in-‐memory
DataSets
• Works
with
multiple
DataSets
• Thursday
the
19th
of
March
– 6AM
San
Francisco
/
9AM
New
York
/
1PM
London
/
2PM
Milan
/
13
UTC
– 11AM
San
Francisco
/
2PM
New
York
/
6PM
London
/
7PM
Milan
/
18
UTC
– 5PM
San
Francisco
/
Fri
9AM
Tokyo
/
Fri
11AM
Sydney
/
0
UTC
Sign-‐up:
http://www.embarcadero.com/landing-‐pages/skill-‐sprints
(2nd
sign-‐up
on
the
left)