Page 1 of 1

Client-Server App

Posted: Wed 24 Mar 2010 17:49
by Diarby
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 ?

Client-Server App

Posted: Thu 25 Mar 2010 18:10
by Diarby
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

Posted: Fri 26 Mar 2010 12:57
by Dimon
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.

Posted: Fri 26 Mar 2010 14:18
by Diarby
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;.

Posted: Mon 29 Mar 2010 09:42
by Dimon
I could not reproduce the problem.
Pelase, try to compose a small sample to demonstrate the problem and send it to dmitryg*devart*com.

Posted: Thu 01 Apr 2010 09:52
by Diarby
I sent the file Sample.7z where you can have more explanations
Thanks :)