Both Server and Local databases?

Charles Yeomans yeomans at desuetude.com
Tue Sep 9 12:53:48 CDT 2003


On Tuesday, September 9, 2003, at 12:24 PM, Ruslan Zasukhin wrote:

> on 9/9/03 6:22 PM, Charles Yeomans at yeomans at desuetude.com wrote:
>
>> Correct.  You would define a Boolean constant kIsLocalDatabase and 
>> then
>> do something like
>>
>> #if kIsLocalDatabase
>> db  = new VDatabase
>> #else
>> db = new VDatabase(host, ...)
>> #endif
>>
>> However, it remains a problem that for a local database, we must use
>> VCursor with the parameters kV_Server, kV_NoLocks, kV_Random.  I'm not
>> so excited about wrapping every call to VDatabase.SQLSelect as above.
>
> Charles,
>
> But for local db you can with the same success use other parameters!!!
>
>         (kServer, kReadWrite, kForward)
>
> Record locks will work for LOCAL db also !
>
> Just for some developers adding record locks cause problems with their 
> old
> code, because they do not take into account locks and do selects not 
> very
> accurate. You see?
>
>
> If you write accurate code then it must be the same for LOCAL and 
> remote
> cursors also.
>

While you were on vacation, I had a problem doing this.  I tried 
setting the parameters differently and the result was error 362 
(kFBL_RecordNotFound).

Charles Yeomans



More information about the Valentina mailing list