|Subject||RE: [IBO] DMLCache problems|
|Author||Daniel R. Jimenez|
> Hmmm. This seems like some kind of weird game. The thread you referredCorrect, however, the demo will not allow me to view the forms, so I am
> to, where you said your problem with DMLCaching was described, appears to
> be about something entirely different, i.e. how to make the demo apps work
> in the C++ Builder IDE. I see that I responded to that; and Lester
> some modified source to solve that problem, I understand.
unable to view the setup of the query(s), etc. So I am having to read the
DFM files, which is fine, but it complicates things as you can imagine, so I
may have miss something which could be the cause of my problem.
> Today you have posted a demo app including an executable that won't runCorrect, I should have checked the settings. My apologies.
> anywhere except on your machine, because it uses your runtime libraries
> is compiled with hard paths to locations on your computer.
> I see in the DFM that you still have PessimisticLocking set true, evenI will have to read through the documentation once more, as I honestly can
> though Lester explained at some point that PL and DMLCaching couldn't be
> used together (unless one understands well how triggers work and is very
> careful about writing them to avoid firing them when you put your datasets
> into a writeable state!!) You can read up the TI sheet on DMLCaching to
> work out why PL would interfere with the triggers that DMLCaching uses.
not remember. But from your reply above (please correct me if I am wrong),
"Before type" triggers are a not compatible with PessimisticLocking ?
The simplified 'Survey Demo' DML_CACHE demo I wrote does not use "Before
type" triggers on the main table, they are all "After type" triggers.
The only "Before type" trigger is used on the DML_CACHE table, which is only
called once an Insertion, Update or Deletion has taken place. Thus,
notifying the other forms, etc via a "Event"
> Another thing I see in the DFM is that you have hard-coded at least twoCorrection made, thanks.
> totally different DatabaseName properties in your test app. In IBO you
> should avoid that property and use TIB_Connection's Server, Path and
> Protocol properties; and, for transactions and statement objects, link
> them to the IB_Connection via the IB_Connection property.
> And NOWHERE do I find a description of any problem relating to DMLCaching,As I mention to Lester, the Demo I wrote (Which follows the Survey Demo to
> though I'm sure that the settings in your test app WOULD mess up
the letter), work perfectly. There is only one scenario in which it does not
behave as I would like.
I would like to stop multiple users from editing the same record at the same
point in time, but allow multi-read of the same record. Therefore, my
understanding is that I have to set the PessimisticLocking property = true
on the IB_Query.
But if I do this, and try to edit a single record (and no other instance of
the application or form is currently editing the record in question) I get
the following error:
> ISC ERROR CODE: 335544569So my original question was what have I done incorrectly?
> ISC ERROR MESSAGE:
> Dynamic SQL ERROR
> SQL error code =-510
> Cursor not updatable.
Lester replied with:
> Don't use PessimisticLocking myself. If I need to lock records, a 'lastWhich from what I understand, he programmatically checks the content of the
> modified' field gets updated, and that tells other users that the
> record is 'busy' and who it is busy with ( -ve user_id = editing, +ve
> user_id = last > changed by )
'last_modified' field prior to allowing the record to be edited.
I was hopping that by following the sample "Survey Demo" as well as adding
the PessimiticLocking = true I could achieve the same thing. But it appears
that I am wrong or that my understanding and subsequent implementation is
> So - if that's all the info available, then I doubt there's anything JasonIf need be I can update the posted file without the previous errors(hardwire
> or I could do with it. How about describing *the problem* ? I'm happy to
> try and help, as long as you can put a frame around what you need....