I am starting to integrate the RemoteDB in my application.
I am using ElevateDB as the back database server.
I have always 2 databases opened, one for configuration in general, and the other with the application data.
Reading the help file i see this comment:
"Note that in client you don't need (and shouldn't) create both
TRemoteDBDatabase and IDBConnection for each manager you use. The code above is
just an explanation about how to create those classes. In a real client
application, you would create the IDBConnection interface and share it among
different TObjectManager instances."
IN my code I have a adapter where I create a TRemoteDBDatabase and the correspondent IDBConnection.
I create 2 instances of this adapter, since I have 2 database connections.
Is it a problem?
I am also working this way since I will eventually have a threaded application then I commonly separatecompletely database code for each thread.
About your first question: yes, you can use two connections. The warning in documentation is just to avoid misleading about the code example. The IDBConnection is the equivalent of the old "TDatabase" and analog (like TADOConnection, TFDConnection, TSQLConnection, etc.). You don't create one database/connection for each dataset you open. But of course you can have more than one in your application.
About your second question, also yes, that's the way you should use it.
Just a small remark about your server code: you don't need the first line with "CreateIDBConnection.Connect", unless you are doing it to check database connection? Because that line will just connect to database and then destroy the IDBConnection anyway.