concurrent remote & local databases...

Ruslan Zasukhin ruslan_zasukhin at valentina-db.com
Wed May 11 08:12:40 CDT 2011


On 5/9/11 7:11 PM, "George Parkinson" <george at microtherapy.ca> wrote:

Hi George,

I did answer you in tickets, and will repeat here also:

> hello all,
> 
> i have a remote db and a local db but can't seem to access them concurrently.
> remote db is called 'atc test 3' and accessing it is not a problem.
> local db is at 'C:\files\dev\dbLocal\local atc test 3.vdb' ...and accessing it
> is a problem
> 
> 
> Private Sub TEST_CONCURRENT_REMOTE_AND_LOCAL()
> 
>     Dim conn_Remote As VConnection
>     Dim db_Remote As VDatabase
>     Dim curs_Remote As VCursor
>     
>     Dim db_Local As VDatabase
>     Dim curs_Local As VCursor

    Valentina.Init()      << should be her and before InitClient.
                                        Check this point.
     
>     Valentina.InitClient
> 
>     Set conn_Remote = New VConnection
>     conn_Remote.Init "localhost", "sa", "sa"
>     conn_Remote.Open
> 
>     Set db_Remote = New VDatabase
>     db_Remote.InitClient conn_Remote
>     db_Remote.Open "atc test 3"
> 
>     Set curs_Remote = db_Remote.SqlSelect("SELECT * FROM Agency")
>     Debug.Print "remote records: " & curs_Remote.RecordCount
>     
>     Set db_Local = New VDatabase
>     db_Local.InitLocal kStorageDefault
> 
> '// everything works up to this point
> '// the local db does exist and is usable...i can open it in non-client mode
> and 
> in vstudio:
> '// i simply can't get the following line to run...it just returns a runtime
> error:
> 
>     db_Local.Open "C:\files\dev\dbLocal\local atc test 3.vdb"
> 
>     Set curs_Local = db_Local.SqlSelect("SELECT * FROM Agency")
>     Debug.Print "local records: " & curs_Local.RecordCount
> ...
> ...
> End Sub
> 
> 
> i've noodled around with GetLocalConnection but got nowhere.
> documentation is really sparse and i'm stumped...can anyone help me out?
> 
> thanks,
> george
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina

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




More information about the Valentina mailing list