Client-Server App

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Diarby
Posts: 5
Joined: Wed 24 Mar 2010 17:38

Client-Server App

Post by Diarby » Wed 24 Mar 2010 17:49

Hello,
I'd like to write CS app using TUniConnection. In the server part, I use two RDM : main and slave. How can I define property so the connection is shared by the two RDM.
My IDE : Embarcader0 2009
Is anyone could help me ?

Diarby
Posts: 5
Joined: Wed 24 Mar 2010 17:38

Client-Server App

Post by Diarby » Thu 25 Mar 2010 18:10

Hello,

I'd like to explain the problem in other words.

I created a server with a remote data module, which creates an interface IMainRDM which inherits IAppServer.

In the *.ridl file created automatically, I created an interface named IBaseRDM which inherits from IAppServer and will be the base for children remote modules.

Then I created another remote module which inherits from IBaseRDM.

This scheme is the one explained by Embarcadero help.

Now, my problem is this. The TUniConnection is put on the MainDM with some providers (Interbase, MySQL and SQLite). Because I want to share this connection, I have to create property so the TUniConnection is used by remote children : what kind of type should be the property ? (TUniConnection is not in the downlist of property :? )

I tried more types to resolve this problem without result. I use the Devart migration wizard to convert the sample from Embarcadero (ShareServer project) but there is a problem : no database object is used, only a simple session.

Maybe I took you more times but I'm really confuse with this problem.

My database is Firebird 2.5 RC2, but I use also MySQL and SQLite.

Thanks a lot

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Fri 26 Mar 2010 12:57

Did I understand you correctly?
If you need to share TUniConnection to client RDM try to create standard TDataModule and use it on both sides.

Diarby
Posts: 5
Joined: Wed 24 Mar 2010 17:38

Post by Diarby » Fri 26 Mar 2010 14:18

Thanks for your help.
Maybe I'm wrong but when I launch the creation of the server part of my app I have to use a remote data module where I put the TUniConnection. Is it possible to use a standard data module instead ?

I read carefully explanations from Embarcadero and I find none explaining how to define other objects from third party. They said only that the connection to database must be safe-thread and they show example with the TSession object. This lastest can't be used with a TUniConnection :oops;.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 29 Mar 2010 09:42

I could not reproduce the problem.
Pelase, try to compose a small sample to demonstrate the problem and send it to dmitryg*devart*com.

Diarby
Posts: 5
Joined: Wed 24 Mar 2010 17:38

Post by Diarby » Thu 01 Apr 2010 09:52

I sent the file Sample.7z where you can have more explanations
Thanks :)

Post Reply