How to work with many dbs inside of ONE logical connection.

Ruslan Zasukhin sunshine at public.kherson.ua
Sun Dec 7 21:58:26 CST 2003


Hi All,

For your info:

In latest Client/server a50 was added MAJOR new feature.

    ability to work with many dbs in the same time
    inside of one logical connection.

This feature important:

1) for VDN developers, because in case your app need access few dbs on
server, you will want to have ONE LOGICAL connection (because for additional
connections it needs to pay by license of Embedded Server).

2) to improve performance on access of few dbs. It is faster keep one
connection live, and use few dbs, then /open/close/ dbs


----------------------
Now the question how to do this.
Very easy.

We already have Vserver class in V4MD, V4RB, VXCMD and C++

Up to know we have use this class only for ADMINISTRATION of server.
Now this is changed.

You can on start create Vserver object with usual parameters
    ( Host, User, Password )

Then simply send this Vserver object into constructor of Vdatabase.


    srv = new Vserver( host, user, passw )
    
    srv.OpenSession()   // we can make connection here,
                        // or even skip this step


    db1 = new Vdatabase( srv )
    db2 = new Vdatabase( srv )

    // all rest 100% the same !!!

    db1.Open()
    db2.Open()

    ....



-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list