hghrp
1/17/2006 1:21:00 PM
what i meant in detail:
void doSomethingInit()
{
// do here what cannot fail, e.g. filling the buffers
}
void doSomething()
{
// here you do what may fail e.g. saving the records
}
....
try {
ttsbegin;
doSomethingInit();
doSomething();
ttscommit;
}
catch {
ttsbegin;
doSomething(); //now buffers are filled with the values you want
ttscommit;
}
regards,
harald
"hghrp" wrote:
> Hi Patrick,
>
> how about an init method?
>
> you could then call it within the catch
>
> hth,
> harald
>
> "Luegisdorf" wrote:
>
> > Hi hghrp
> >
> > of course my code is inside a tts but if a error occoured the cache is not
> > flushed for the class which was proceed the code and tried to rerun. If I
> > close the the process and start the class again, the data looks flushed.
> >
> > ......
> > situaion like:
> >
> > void doSomething()
> > {
> > // data manipulation with dynamic created buffers
> > }
> >
> > try
> > {
> > ttsbegin;
> >
> > doSomething();
> >
> > ttscommit;
> > }
> > catch
> > {
> > ttsbegin;
> > doSomething(); // try again, but the cache looks not flushed ...
> > ttscommit;
> > }
> > ......
> > other ideas?
> >
> > Thank you
> > Best regards
> > Patrick
> >
> >
> > "hghrp" wrote:
> >
> > > Hi Patrick,
> > >
> > > and ttsbegin/ttsabort does not do the trick?
> > >
> > > regards,
> > > harald
> > >
> > > "Luegisdorf" wrote:
> > >
> > > > Hi everyone
> > > >
> > > > I need a command which flushs all tables instead of flushing one specified
> > > > table. Until yet I didn't find something like this, but may be you know it!
> > > >
> > > > The situation is that I use dynamicly created buffers (common = new
> > > > DictTable(anyNo).makeRecord()) and sometimes an error throws, after I catch
> > > > with try/catch I want restart - but of course with a flushed DB memory ...
> > > >
> > > > Thank you for answers.
> > > > Best regards
> > > > Patrick