VServer and launchd

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Nov 15 00:44:12 CST 2006


On 11/15/06 12:02 AM, "Charles Yeomans" <charles at declareSub.com> wrote:

>>> I need to create a VConnection object.
>>> Must I call its Open method before creating a new VDatabase object?
>> 
>> as I remember its optional.
>> 
>> You must call Vconnection.Open() only if you use Vserver class.
>> See example Common/Vserver...
> 
> I just tried this.  The following code crashes.
> 
>    dim connection as new VConnection(Prefs.ServerAddress,
> Prefs.UserName, Prefs.UserPassword)
>    dim newDB as VDatabase = new VDatabase(connection)
> 
> But this code works.
> 
>    dim connection as new VConnection(Prefs.ServerAddress,
> Prefs.UserName, Prefs.UserPassword)
>    connection.Open
>    dim newDB as VDatabase = new VDatabase(connection)

Okay, right.

I see this in ExamplesTools.MakeNewDatabase:

  try
    if( gClient ) then
      gConnection = new  VConnection(host, userName, password)
      
      // Enable SSL
      if( gSSLEnable ) then
        gConnection.UseSSL()
      end if
      
      gConnection.Open()
      return new VDatabase(gConnection)
    else
      return new VDatabase(storageType)
    end if
  catch err As VException
    MsgBox(err.Message)
    Quit
  end try
-----------------------

So yes, connection must be opened alays, later in the scope of this
connection we create database objects, Vserver objects ...



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