Three Questions...

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Nov 25 12:16:06 CST 2003


on 11/25/03 1:06 AM, Ken Ray at kray at sonsothunder.com wrote:

> Question #1:
> 
> Our current software uses two databases - one for main data storage
> ("iedb") and one as a set of zip codes for lookup ("iezips").
> Additionally, when the user logs in, we access "master.vdb" to confirm
> whether they are actually appropriate users of the system. In any event,
> looking at the Terminal log shows that we have three connections (one
> for each DB) for each user during our program initialization. Does this
> mean that we need to use 3 connections per user? We had always thought
> it was a kind of "one connection per user" that we would be selling
> until we saw the terminal output.
> If this is the case, can I assume that as soon as the connection to a
> database is closed that the connection can be reused? For example, if we
> used the "master.vdb" connection very briefly at login and closed that
> connection, the user would only have two active connections against the
> total connections that were licensed for the server, right?

Okay, Ken.

I think we improve Client in this area.

I think we can use current class Vserver to establish connection.
And use it in Vdatabase constructor.


    srv = new Vserver ( host, user, pass )

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

    db1.Open("aaa");
    db2.Open("bbb");

    db1.SqlExecute();
    db2.SqlExecute();
    
    db1.Close()
    db2.Close()
    
    srv = nil
    

Looks not bad.

In background Vserver have only one CURRENT db,
But in wrappers as V4RB, V4MD, VPHP, we can switch default db if needed
self.


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