Create local database problem

Bart Pietercil bart.pietercil at gmail.com
Mon May 21 12:58:16 CDT 2007


On 21-mei-07, at 19:35, Ruslan Zasukhin wrote:

> On 5/21/07 4:55 PM, "Bart Pietercil" <bart.pietercil at gmail.com> wrote:
>
> Hi Bart,
>
>> Hi List, Ruslan
>>
>> I'm having trouble creating a local database on windows with V4RB.
>>
>> Problem is the created database is always appended with .vdb
>> extension. This is not happening on OSX.
>
> RIGHT. Expected
>
>> Is there a way to prevent this from happening.
>
> NO !!
>
> Windows cannot live without file extensions I believe.
>
>
>> What I do is:
>>
>> f = getSaveFolderitem(".myextension","afilename")
>>
>> This works fine, it gives me a file with the name "test.cpf"
>> When I pass this folderitem to the Valentina.Create function, it
>> returns a valid databasefile with the name "test.cpf.vdb"----> Not  
>> good
>>
>> Can I prevent Valentina from appending its own extension, when there
>> is already an extension ?
>
> Exists such method
>
>     Valentina.Extentions()
>
> Which MAY BE will allow what you want.
>
> But I will recommend do reverse:
>     if you develop cross-platform project,
>     then better that ALWAYS was mydb.vdb on both platforms


I would like to disagree. When I want the local db that my app  
created to launch my application on doubleclick I need to bind the  
extension with my app (not one of the colleagues on the list, not  
with VStudio) so I need an extension of my own. Only the app that I  
develop knows how to handle the file it created, so it the document  
created by the application, in this case the database, has to be  
bound to my application. On windows the only way to do this is by  
having an extension.

I do agree for databases that will be opened by a server.

In our application we have several types of documents which are all  
Vdatabase files. Based on the extension my app knows that one type  
has to be "imported", the other just opened, another will be  
encrypted and so on.

So I think a feature request is in order where the create command  
will accept an extension to use when an extension is passed as an  
argument.

Bart Pietercil






More information about the Valentina mailing list