Valentina.GetDatabaseVersion() and remote database

Stan Busk maxprog at mac.com
Wed Mar 14 13:41:29 CDT 2007


Hi,

Strange. The code below works:

dbi = mValentinaServer.DatabaseInfo(1)
myDb = new myDatabase( mVConnection )
f = new FolderItem( dbi.path, FolderItem.PathTypeShell )
DBVersion = Valentina.GetDatabaseVersion( f )

but as soon as I call Valentina.GetDatabaseVersion( f ) from inside a  
method I get a Valentina Exception #-39. In other words, rather than  
calling DBVersion = Valentina.GetDatabaseVersion( f ) directly I have  
that function:

Function Database_UpdateSchema( inFile As FolderItem )
   Dim DbVersion as Integer
   DbVersion = Valentina.GetDatabaseVersion( inFile )
End Function

I don't understand the point here.

stan

> On 12/3/07 8:18 PM, "Stan Busk" <maxprog at mac.com> wrote:
>
> Hi Stan,
>
>> Are the two last lines of the following code correct?
>>
>> ---
>> mVConnection = new VConnection( aHost, aUserName, aPassword, aPort,
>> aTimeOut, aParameter )
>> mVConnection.Open()
>> mValentinaServer = new VServer( mVConnection )
>>
>> dbi = mValentinaServer.DatabaseInfo(1)
>>
>> myDb = new myDatabase( mVConnection )
>>
>> f = new FolderItem( dbi.path, FolderItem.PathTypeShell )
>>
>> DBVersion = Valentina.GetDatabaseVersion( f )
>> ---
>
> Not a fact this is correct.
> Db already should be registered under VSERVER.
>
>> I am just trying to get the served DB version. It works fine when the
>> database in on localhost but I have doubts that would work on remote
>> DBs as well unless Valentina is clever enough to just use the DB name
>> and already know what and where to look at. It looks like the Open()
>> method is already that clever.
>
> Right. Open() opens db by name as it is registered under vserver
>
>
> -- 
> 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]
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina



More information about the Valentina mailing list