Valentina.GetDatabaseVersion() and remote database
Stan Busk
maxprog at mac.com
Wed Mar 14 14:11:56 CDT 2007
Hi,
My app is supposed to open files both locally and remotely. I share
one single 'open' method for both I have adapted to handle remote and
local files. That method is doing some checking. One of those
checking is a call to a SchemaUpdate method. That SchemaUpdate method
includes the V1-V2 conversion stuff, reason why I check for DB
version at the very beginning. Now, I don't understand why the exact
same line doesn't work and rise an exception when called from my
SchemaUpdate method when it works fine when calling directly.
Anyway if I add a conditional and jump to the rest of the function I
get a #-39 Exception at the line vdb.Open( f ). f is not nil.
f = new FolderItem( DBPath, FolderItem.PathTypeShell )
Again, the same code in the same function works, not when called form
a method. That is:
f = new FolderItem( inPath, FolderItem.PathTypeShell )
vdb.Open( f )
works fine.
f = new FolderItem( inPath, FolderItem.PathTypeShell )
myDocumentOpen( f )
where
Function myDocumentOpen( f As FolderItem )
vdb.Open( f )
End Function
doesn't work and rises a #-39 Exception.
stan
> On 14/3/07 8:41 PM, "Stan Busk" <maxprog at mac.com> wrote:
>
>> 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,
>
> I think this will not work remotely.
> What sense in this task?
>
>> dbi = mValentinaServer.DatabaseInfo(1)
>
> So db already is under VSERVER and is opened.
> Then it have CORRECT version.
>
> Sense to check it ?
>
> --
> 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