open status

-= JB =- sundown at pacifier.com
Fri Jan 18 01:02:09 CST 2008


Hi Ruslan,

Thanks for the info.

I think with the info you provided and using a variety of the
commands I can check the status and prevent any errors
due to a database already being open or not having been
opened thus no dbRef.

At first I was thinking one command would be able to check
but I now see it will take a combination to do the job.  That is
not a problem.

thanks again,
-=>JB<=-



On Jan 17, 2008, at 10:36 PM, Ruslan Zasukhin wrote:

> On 17/1/08 3:45 PM, "-= JB =-" <sundown at pacifier.com> wrote:
>
> Hi JB,
>
>> In your recent replies you explained dbRef very good below
>> and another answer asked me to explain my task.
>>
>> The task is simple.  All I wanted to do was use the throwout
>> command.  It said the database needed to be closed to use
>> it so I started thinking it needed a file path instead of dbRef.
>> Then I started looking for a way to make sure the database
>> was closed so the user would not get an error.
>>
>> After your explanation and my reading it better I realize the
>> Throwout command uses a dbRef.  Therefore to use it I will
>> need to open the database first and then close it before I
>> can use Throwout with dbRef.
>
> Right.
>
> May be this points will help you better understand Valentina for  
> Revolution
> model.
>
> 1) Valentina engine is written on C++.
>     we love OO design.
>
> 2) many supported language (REALbasic, C#, ObjC) also are OO  
> languages, so
> we provide for this normal classes. If you know at least one OO  
> language,
> you know this syntax:
>
>     db = new Vdatabase
>     db.open()
>     db.close()
>     db.throwout()
>     db = nil
>
> I.e. You need CONSTRUCT and DESTRUCT object.
> And you call its methods via DOT syntax.
>
>
> 3) Few languages, as Revolution, PHP, C are not OO,
>     but we simulate this OO style.
>     For this role of OBJECT play dbRef, tblRef, ...
>     and first parameter of most methods is this Ref
>
>> Maybe I need to keep track of databases that have already
>> been opened to eliminate the confusion.  Is there a problem
>> with opening a database that has already been opened?  If
>> not then I could just open it, close it and throwout even if it
>> was open already.
>
> If you have dbRef on hands you need just code:
>
>
>     if VDatabase_IsOpen( dbRef )
>         VDatabse_Close( dbRef )
>
>     // here we know that dbRef is closed.
>     VDaatabse_ThrowOut( dbRef )
>
>
> -- 
> 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