Question regarding C++ client SDK

Ruslan Zasukhin sunshine at public.kherson.ua
Sat May 24 16:15:49 CDT 2003


on 5/24/03 3:23 PM, Jochen Peters at j.peters at piit.de wrote:

Hi Jochen,

> i am currently integrating server connections into vStudio.
> 
> In the past i have made my own connection interface - as a wrapper for
> "connections" to local databases
> and for connections to server databases - because i have written this
> interface BEFORE yours - i do have to
> change it now slightly.
> 
> Studying your interface i came across the following questions:
> 
> 1) How is the relation between connections and databases managed in the
> client SDK? Do i have to
> construct a connection object first - and all subsequent calls to the
> sdk are routed through this connection?
> Can i have more than one connection to valentina server - if yes how do
> i have to code this?
> 
> Example.
> Server has two databases A and B
> - user opens first connection to server and opens A within this
> connection - he can also open the
> second database B using the already open connection, right?
> Can a second connection be established for database B? If yes - how can
> i switch between connections?
> 
> 
> 2) In the constructor of VDKC_DataBase i have seen the parameters for
> host, user, etc.
> This is strange - does that mean that i don't have to use
> VDKC_Connection at all?

Jochen,

Very simply.

DO NOT use directly VDKC_Connection class !!!!!!!!
This class is used by VDKC_Database and Vserver classes.
This is why you see that parameters in VDKC_Database.

You simply need create

    remote_db = new VDKC_Database( host, name, passw, port )

Now you can do.
    
    remoe_db.Open( "db_name" ) // not full path !!!


As you see to switch to remote database, you simply need change ONE LINE of
code -- construction of Database object,

In Valentina we do not work with class Connection directly.
That class present only as common abstraction for Vdatabase and Vserver
classes.

If you will need open 2 connections to the same database on server, you need
create 2 VDKC_Database objects.


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