How can a TClientDataSet determine what type of database it is (remotely) connected to?
Asked Answered
A

0

2

Under FireDAC, I have a TFDConnection -> TFDQuery -> TDataSetProvider in a server app and a TClientDataSet in a client app. They are connected through the RemObjects Remoting SDK. (The TClientDataSet.RemoteServer is set to a TRODataSnapConnection).

The TFDConnection may be connected to different database types.

With the TClientDataSet code in the client, (how) can I determine the database type?

For a simple app containing all these components I could scan the datamodule for a component of type TDataSetProvider with name TClientDataSet.ProviderName at design time (messy but doable), but for this client/server architecture I have no idea how to do this...

The TRODataSnapConnection only has a ServerName property set to TTServer.RDMDataBasis. TTServer is the server application, RDMDataBasis is a TRemoteDataModule in there.

Argosy answered 8/12, 2017 at 15:47 Comment(3)
XY Problem? Why would you need this? You're supposed to connect to middle tier without concern for how / what persistence layer it connects to.Bey
@CraigYoung You are correct. This is the X from the YArgosy
Any solution how to pass database type from client to server?Freiburg

© 2022 - 2024 — McMap. All rights reserved.