Board index » delphi » Connecting to more than one remote data module / automation object with the same GUID

Connecting to more than one remote data module / automation object with the same GUID

Hi all,

I have a normal 2-tier database application. When user runs the application, he
can choose the database he wants to use (if there're more than 1 database in the
database server). Once the selection is made, the application will always use
that database. If user wants to change database, he must close the application
and start a new one.

Now I'm supposed to develop a Pocket PC (Windows CE) application that uses a
feature in the application. I'm thinking of creating a web application, since
Delphi's executable cannot be deployed in Win CE. The problem is, I cannot use
the unit that contains the feature in my web app. It uses a lot of other units
in the application, and was not designed to be used by other applications. I'm
thinking of adding a remote data module into the application, add the necessary
functions to use the feature, and let my web application communicate with it
using Midas connection.

By using this way, 1st part of the problem is solved. But if a user is using
database A, then another user wants to use database B (both are using Pocket
PC), how is he going to connect to database B? The database application being
accessed by the web application is connected to database A, and I don't think
opening a new instance of the same application that connects to database B will
help, because both application use the same GUID for their remote data modules.
AFAIK, the web app won't be able to choose which remote data module it should
connect to, and it will connect to the 1st one (database A), although the 2nd
user wants to use database B!

Hopefully the scenario above is clear enough to explain the situation, any
suggestion / solution will be much appreciated.

Thanks in advance.

 

Re:Connecting to more than one remote data module / automation object with the same GUID


Unless you're reusing RDM instances, I don't see why this would be a
problem. Each separate client receives a unique web/http session and thus
can create its own RDM instance (doesn't matter if you have 1 CLSID) and
initialize it with the correct DB info necessary to connect to the desired
DB server.

--
have fun

Binh Ly
www.techvanguards.com

Quote
"Andy Wenas" <cerbe...@pacific.net.sg> wrote in message

news:3ae59c98_1@dnews...
Quote
> By using this way, 1st part of the problem is solved. But if a user is
using
> database A, then another user wants to use database B (both are using
Pocket
> PC), how is he going to connect to database B? The database application
being
> accessed by the web application is connected to database A, and I don't
think
> opening a new instance of the same application that connects to database B
will
> help, because both application use the same GUID for their remote data
modules.
> AFAIK, the web app won't be able to choose which remote data module it
should
> connect to, and it will connect to the 1st one (database A), although the
2nd
> user wants to use database B!

> Hopefully the scenario above is clear enough to explain the situation, any
> suggestion / solution will be much appreciated.

> Thanks in advance.

Re:Connecting to more than one remote data module / automation object with the same GUID


Hi Binh, thanks for the reply

The problem is, the RDM doesn't initiate any database connection. It just
provides the interface needed to call the functions in the app that I want to
use.
This is because the feature in the app that I want to use must use the
connection provided by another unit in the app, and I'm not supposed to change
anything in the application.

Quote
"Binh Ly" <b...@castle.net> wrote in message news:3ae644da_1@dnews...
> Unless you're reusing RDM instances, I don't see why this would be a
> problem. Each separate client receives a unique web/http session and thus
> can create its own RDM instance (doesn't matter if you have 1 CLSID) and
> initialize it with the correct DB info necessary to connect to the desired
> DB server.

> --
> have fun

> Binh Ly
> www.techvanguards.com

Other Threads