V4MD : Connecting to a local DB AND to a server DB possible ?

Steven Ophalvens silversoft at skynet.be
Tue Aug 14 09:14:38 CDT 2007


The problem is that I need to use 2 different databases :
- 1 located on a server
- 1 located on the users computer containing multimedia material
This means that I need to do both a .initClient() and an .init() on 
My valentina object to be able to work with both kinds of databases.

The problem is that as soon as I do the .init() call, any connection
Objects that I create after that point, can not be successfully opened,
because I get an invalid login/pass error, which certainly is not the case.
If I remove the .init() call, opening connections to the server db
works everytime, but then I can not access the local DB.

Anyway, I only need 1 connection to the server database, but I think I
Wrote that I 'reused' it, when I meant that I .close() it after I have
Worked with it and open() it when I need it again. 
So I think that 1 Instance of a connection object that is opened/closed
at the right time should be enough for me.

Greetings,

Steven Ophalvens

-----Oorspronkelijk bericht-----
Van: valentina-bounces at lists.macserve.net
[mailto:valentina-bounces at lists.macserve.net] Namens Ivan Smahin
Verzonden: dinsdag 14 augustus 2007 15:58
Aan: Valentina Developers
Onderwerp: Re[4]: V4MD : Connecting to a local DB AND to a server DB
possible ?

Hello Steven,

Tuesday, August 14, 2007, 4:43:25 PM, you wrote:

> Hi Ivan,

> I did as you told me : closed & voided the connection object after I used
it
> and then 
> make a new connection object after the init() call. Seems that this is a
> sure-fire way
> to make Director exit with a fatal error  
> If I remove the call to .init(), it Works again as expected.

I'm afraid I don't get completely what are you doing.

> If I place the .init() call before the First attempt to connect to the db,
> it fails
> there as well ...

You need more than single connection? Why?
But even so - it is possible.


> Is there a reason you should not reuse a connection object? All I do is
> close() it
> after I have done a certain block of code and later open() it again when I
> need to
> connect to the same db again.

Each valentina's object you created is aware of the particular connection.
So  if  you  plan  to  use  multiple  connections  you  should use
different set of such objects.

BTW,  I'm  afraid  "connection = void" is not enough. Database, tables
and so on will keep it out of destroying.


-- 
Best regards,
Ivan Smahin 
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com

_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina


More information about the Valentina mailing list