FireDAC replacement for DataSnap based TDataSet access [Edit]

Hello,

I hope you can help us choosing the right strategy for integrating FireDAC.

At the moment we have a client/server application in which we already replaced the data access to FireDAC. This is working really good and was easy to integrate.
So we have:
server: TDataSetProvider --> TADQuery --> TADConnection --> DB
client: TClientDataSet --> TDSProviderConnection --> TSQLConnection

Now I'd like to bring FireDAC to the client as well as we experienced a few problems with TClientDataSet. As the other parts of our business logic rely on DataSnap the easiest solution would be to get the TDataSet from the server directly into a FireDAC component, most likely a TADMemTable.

Can we do it this way? And if yes, which components should we use?
If that is not possible, how should we do the client/server communication regarding datasets?

Thank you for your help,
Sebastian Jänicke

Edited by: Sebastian Jaenicke on Mar 28, 2013 3:21 AM

Edited by: Sebastian Jaenicke on Mar 28, 2013 3:22 AM
0
Sebastian
3/28/2013 10:22:30 AM
embarcadero.delphi.firedac 822 articles. 2 followers. Follow

6 Replies
3132 Views

Similar Articles

[PageSpeed] 52

We are also changing to FireDAC and the first test went very well. We come from the BDE components and basically the only change we made is the TDataBase to TADConnection. So, the TADQuery we immediately connect to the TDataSet. We don't have to deal with the others (we didn't use before) like TClientDataSet an TDataSetProvider an TDSProviderConnection. Maybe in your situation it is different while you have to deal with the middle part DataSnap.
0
Robert
3/28/2013 10:31:37 AM
> {quote:title=Robert Triest wrote:}{quote}
> We don't have to deal with the others (we didn't use before) like TClientDataSet an TDataSetProvider an TDSProviderConnection. Maybe in your situation it is different while you have to deal with the middle part DataSnap.

We need a form of in memory table as we need offline capabilities and because of performance reasons. FireDAC includes this in the normal query component, so this is no problem.
But we need a central server which delivers the data for several reasons, amongst others because we do not want to have the need to allow direct access to the DB from outside our server. So we need a possibility to distribute the data from the server to the client and to apply changes backwards.

If we use DataSnap or if we can use FireDAC directly somehow is not +this+ important, though we would want to continue to use DataSnap for data access too if possible.
0
Sebastian
3/28/2013 10:59:06 AM
Hello Sebastian

> Can we do it this way? And if yes, which components should we use?

You can use FireDAC DataSnap driver to connect to a
DataSnap server. Then you will be able to call DataSnap
server methods using TADStoredProc. When a method
has TDataSet parameter, then it will be returned to the
client and TADStoredProc will be able to Open this
resultset. 

At moment no more DataSnap features are supported.

-- 
With best regards,
Dmitry Arefiev / FireDAC Architect
FireDAC - Firebird, SQLite, MySQL, SQL Server, Oracle, PostgreSQL, 
DB2, SQL Anywhere, Access, Informix, ODBC high-speed data access lib
0
Dmitry
3/28/2013 3:33:35 PM
Thank you for your answer. So we can only access results, but we can't directly communicate (apply changes, ...), that's a real pity. But it already looked like this for me.

> 
> At moment no more DataSnap features are supported.
> 
Do you have information regarding plans to enhance this support and if yes can you say something about it?

As DataSnap and FireDAC are both important technologies for Embarcadero now, I think Features like direct connection to remote datasets as TClientDataSet offers would be very interesting.
I know that other technologies exist, perhaps better than DataSnap, but a solution with only components Embarcadero itself offers would be great.
0
Sebastian
4/5/2013 8:46:00 AM
> I know that other technologies exist, perhaps better than DataSnap, but a solution with only components Embarcadero itself offers would be great.
For a test we made a DataSnap server connecting via both DBX and FireDAC to MSSQL. We use this for external software. We are also doubting and 
I wonder if it is just not the best  way to go with DBX because DataSnap is based on DBX and DBX has the DataSnap features. For example, to let a 
IOS devide (mobilestudio) make a connection to the datasnap server and database is that possible with FireDAC?
For our internal software it seems the most easiest way to change to FireDAC (change from BDE) which have the direct connection to TDataSet
and the bi-directional structure. Otherwise we have to deal with all our DBGrids/Data modules that need the extra Provider/ClientDataSet components.
0
Robert
4/5/2013 9:06:29 AM
> I wonder if it is just not the best  way to go with DBX because
> DataSnap is based on DBX and DBX has the DataSnap features.

If to compare DBX and FireDAC, then FireDAC is more
feature rich.

FireDAC DataSnap driver uses DataSnap and DBX base
classes. But on a higher level the FireDAC provides more
flexible datasets.

In future FireDAC support for DataSnap will be extended.

> For example, to let a IOS devide (mobilestudio) make a
> connection to the datasnap server and database is that possible with 
> FireDAC?

Yes, it is. If DataSnap works on a mobile device, then
FireDAC DataSnap driver will work on a mobile device
too.

-- 
With best regards,
Dmitry Arefiev / FireDAC Architect
FireDAC - Firebird, SQLite, MySQL, SQL Server, Oracle, PostgreSQL,
DB2, SQL Anywhere, Access, Informix, ODBC high-speed data access lib
0
Dmitry
4/5/2013 4:15:29 PM
Reply:

Similar Artilces:

FireDAC as Datasnap Client [Edit]
Hi All, Is it possible to use FireDAC components (FDConnection -> TFDQuery) as DataSnap Client (with out TClientDatatset) ?. I need this option to migrate from IBX to DataSnap make easy. TFDConnection can connect to DataSnap Server, but cannot connect TFDQuery, get exception "[FireDAC][Phys][TDBX][Datasnap] Remote error: Dbx.SQL is unrecognized command type". I guess I missed something. Any advice welcome. Thank you J Edited by: Jayanto Chua on Nov 24, 2013 6:00 PM Hello Jayanto FireDAC DataSnap supports TFDStoredProc. You can use it to call DataSnap serve...

FireDAC and Delphi Pro XE4... firedac tab not visible?
I am moving from a very old Borland product (2006) to Delphi XE4 Professional with FireDAC addon. I purchased both from Embarcadero, and have downloaded both. The documentation says the FireDAC components should automagically appear in the tabset for Delphi. They do not. I don't want to fool around too much as my environment is strictly controlled by IT, and they are very slow to do anything. Is there something that I should have done, but did not do? I installed XE4 first, registered it, then used the link in my email from Embarcadero to download the FireDAC components. Then I ra...

FireDAC: cannot access PostgresSQL Mac [Edit]
I help a customer working on a cross platform project with PostgresSQL. On windows everything works fine, but on mac we get the error " [..] no suitable image found [..] mach-o but wrong architecture". System: XE4 / Windows 8 / VMWare running on a MacBook Pro / OSX 10.8 / PostgresSQL 9.2.2.0 server Have no clue atm so any help appreciated. Regards Michael Jung Hello Michael It seems, your Mac OS X has only x64 libpq.so. But Delphi produces x86 executable for Mac OS X. Try to uninstall PgSQL software and install it again. -- With best regards, Dmitry Arefiev / F...

FireDAC suitable as data-access component in DataSnap server?
Hello Folks! In Delphi XE3, when FireDAC became available, I tested it as a possible replacement for +dbExpress+ on the app server side (DataSnap server). I discovered that the IProviderSupport methods of +TADDataSet+ implemented the method +PSUpdateRecord+ by opening the query again, positioning itself on the correct record, go into edit mode and apply the change. This is in stark contrast to +TCustomSQLDataSet.PSUpdateRecord+, which just returns False and forces the +TSQLResolver+ to generate the appropriate update SQL command in +TSQLResolver.InternalDoUpdate+. Obviously opening the da...

How to return multiple datasets with datasnap using FireDac? [Edit]
Hi again, i am working on a client/server software using DelphiXE4 and FireDac, i have a MySQL Database on a remote server, and i have a Datasnap Server (that uses a TCP Transporter) that communicate and exchange data between the Database and clients. I would like that the server returns multiple datasets to clients in only one request. I saw this samples on internet: *Server:* {code} function TServerMethods1.GetData(SQL: string): OleVariant; var cds: TClientDataSet; begin cds := TClientDataSet.Create(nil); try { setup 'cds' to connect to database } { pull...

FireDAC and Datasnap
Hi XE5 MSSql Windows 7 (Dev machine) Windows 2008 server (server machine) I am experimenting with a Multi tier database server and client applications. If I run the datasnap server app locally(connecting to local DB) I can connect from my client app. When I deploy the server app to the server online and try and connect I get the following error Remote error[FireDac][Phys][ODBC][Misrosoft][ODBC Driver Manager] Data source name not found and no default driver specified" Can someone assist me. Do I have to setup a ODBC driver on the server? Thanks > Can someon...

Insert, Update, Delete very slow with FireDAC DataSnap server [Edit]
Hello, I create two DataSnap server named (1)FireDAC_svr, and (2)DBX_svr, and one DataSnap client named DBX_client. And we have: FireDAC_svr: TADConnection -> TADQuery -> TDataSetProvider DBX_svr: TSQLConnection -> TSQLDataSet -> TDataSetProvider DBX_client: TSQLConnection -> TDSProviderConnection -> TClientDataSet FireDAC_svr and DBX_svr set to the same DataBase environment. DBX_Client can connect to FireDAC_svr and DBX_svr, too. First, DBX_Client connect to FireDAC_svr, and do select, insert, update and delete for 1000 records in each step. The time cost as ...

FireDAC mobile app error as sqlite as delphi XE7 [Edit]
i im trying of connect my app as FireDAC but i have some errors. I follor all steps of Mobile_Tutotils_en_pdf file for delphi XE7. First i add one FireDAConnection compoent, after i in FireDAConnection Edito i set DriverID as Sqlite, in Database parameter i set this existing sqlite database "shoplist.s3db i create this database and table as other tool, and i can to add this to DBExpres in data exploer and i can to use it in one mobile delphi project", and i set lockingmode to normal as this manual tell. After as tell in page 269 of this manual when i click over test button, i ...

FireDAC mobile app error as sqlite as delphi XE7 [Edit] #2
i im trying of connect my app as FireDAC but i have some errors. I follow all steps of Mobile_Tutotils_en_pdf file for delphi XE7. First i add one FireDAConnection compoent, after i in FireDAConnection Edit i set DriverID as Sqlite, in Database parameter i set this existing sqlite database "shoplist.s3db , and i set lockingmode to normal as this manual tell. I After i follow steps 1,2,3,4 and in the step 5 of the page 265 when i try of to set Connected property to true, i get this error: 1. [FireDac][Comp][Clnt]-340. Driver ID is not defined. Set TFDConnection.DriverName or Add D...

Caution error in FireDac 8.0.1 to Delphi Xe2 and earlier [Edit]
Please note that FireDac 8.0.1 have a bug, Embarcadero refuses to correct an error. In December 2014 I bought FireDac to Delphi XE2, 8.0.1 a few days later it turned out that the program has a bug StrsEmpty2Null not support parameter which makes the component is not useful for me. Although embecedro 8.0.5 patch is available and I bought a legal component, has not made me any corrections. Help addicted from buying Delphi Xe 7.0 Information received from worker embecedro Poland?. Does this attitude is fair. Can someone please help me make a package 8.0.5 or help to improve the error. E...

Caution error in FireDac 8.0.1 to Delphi Xe2 and earlier [Edit]
Please note that FireDac 8.0.1 have a bug, Embarcadero refuses to correct an error. In December 2014 I bought FireDac to Delphi XE2, 8.0.1 a few days later it turned out that the program has a bug StrsEmpty2Null not support parameter which makes the component is not useful for me. Although embecedro 8.0.5 patch is available and I bought a legal component, has not made me any corrections. Help addicted from buying Delphi Xe 7.0 Information received from worker embecedro Poland?. Does this attitude is fair. Can someone please help me make a package 8.0.3 or help to improve the error. E...

FireDac
Hello, I am using Delphi XE4 and facing a problem with FireDac (8.0.5) and MySQL. I'm trying to get the last 100 records from a large table (20 million rows). When I run the following SQL: {code}select * from largetable order by FId limit 100{code} in MySQL Workbench it returns in 0.2 seconds. When I run the above SQL in Delphi through an ADQuery it never returns (Delphi freezes). Any Ideas ? Thank you ...

Caution error in FireDac 8.0.1 to Delphi Xe2 and earlier [Edit] #2
Please note that FireDac 8.0.1 have a bug, Embarcadero refuses to correct an error. In December 2014 I bought FireDac to Delphi XE2, 8.0.1 a few days later it turned out that the program has a bug StrsEmpty2Null not support parameter which makes the component is not useful for me. Although embecedro 8.0.5 patch is available and I bought a legal component, has not made me any corrections. Help addicted from buying Delphi Xe 7.0 Information received from worker embecedro Poland?. Does this attitude is fair. Can someone please help me make a package 8.0.5 or help to improve the error. E...

FireDAC keeps using native client 11.0 for SQL Server 2000 access [Edit]
With the new Delphi XE5 and FireDAC in possession, I wanted to explore the possiblities of FireDAC, after having worked with ADO for many years. One of the things I tried was connecting to an SQL Server 2000 database, but the following error keeps appearing: *'[FireDAC][Phys][ODBC][Microsoft][SQL Server Native Client 11.0]SQL Server Native Client 11.0 does not support connections to SQL Server 2000 or earlier versions.'.* Just to be sure, I downloaded and installed the x64 SQL Server native client which is part of the Feature Pack for Microsoft SQL Server 2005 SP4 (http://www.mic...