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

Steven Ophalvens silversoft at skynet.be
Tue Aug 14 11:15:34 CDT 2007


Hi Ruslan,

I do call the init() & initClient() calls exactly once each during the
complete run of the program. It doesn't matter if I First do the .init()
or the initClient() calls, the order doesn't do anything to the problem.
As soon as I have done the .init() call on the valentina object, I get
Problems when I try to open a connection to a serverdb : 
Error 533763 (ERR_CONNECTION_INVALID_USER_NAME_OR_PASSWORD).

When I omit the init() call, the Connection to the serverDB Works 
without a problem, but as a result I can not connect to my local DB,
which has all the media I need to work with. 

For the rest I follow the principles you wrote, and have never called
the init() method more than once. It's the combination of init() and
initClient() that gives me problems :(


Greetings,

Steven Ophalvens
-----Oorspronkelijk bericht-----
Van: valentina-bounces at lists.macserve.net
[mailto:valentina-bounces at lists.macserve.net] Namens Ruslan Zasukhin
Verzonden: dinsdag 14 augustus 2007 17:57
Aan: valentina at lists.macserve.net
Onderwerp: Re: Re[4]: V4MD : Connecting to a local DB AND to a server DB
possible ?

On 14/8/07 5:14 PM, "Steven Ophalvens" <silversoft at skynet.be> wrote:

> 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.

Actually picture of calls must be

1) init engine

    Valentina.Init()
    Valentina .InitClient

2) init connections

    gConn = new(Xtra "VConnection", "localhost", "sa", "sa" )


MANY TIME you can do:

   gConn.Open()
        db1 = new VDatabase
        db1 ....

   gConn.Close()  -- all objects of this connection DEAD now


3) for local dbs you do just

    db2 = new Xtra Vdatabse ...
    db2.Create or open
        ...
    db2.Close


4) and when you done you do

    Valentina. Shutdown()
    Valentina.ShutdownClient


So you must NOT call Init many times as you say


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]


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


More information about the Valentina mailing list