Subject | RE: [IBO] Re: POSTING DATA from a TIBOQUERY Field inhibits use of the Query fields. |
---|---|
Author | Alan McDonald |
Post date | 2006-10-23T23:57:12Z |
> > > I have converted my application over from BDE to IBOojects and I amso in short, you are calling transaction.commit in the after post event of
> > > running into a problem. I used data from my query after doing a post
> > > on the data. I then use the data in the Query for some other functions
> > > before finishing my task. With the BDE this worked OK. Now I notice
> > > that once I post the data, my data is not retained in the Query. In
> > > the example below Message 4 is OK and Message 5 is Blank( no data ).
> > >
> > > ShowMessage('4 Res OK: ' + FieldByName('PICKUPDATE').AsString);
> > > Post;
> > > ShowMessage('5 Res OK: ' + FieldByName('PICKUPDATE').AsString);
> > >
> > > Is there an option to allow this behavior or do I have to change my
> > > code. Changing the code could be a ardous process in that I have a
> > > lot of code and I would have to check every place I am doing a post to
> > > fix the problem.
> > >
> > > Thanks in Advance
> > >
> > > Jack Engleman
> > I'm not sure how you have setup your transactions. Do you call
> commit after
> > post? do you have a caClose action as your CommitAction?
> > Alan
> >
> AFter the Post, then I have some other routines I call with the
> FieldByName('PICKUPDATE').AsString as a paremeter and those functions
> and procedures do not see a null pickupdate and after those procedures
> I was calling a commit transaction. That commit is working since all
> of the rest of the program runs correctly as far as I can tell from my
> beta sites. That statement is good until I hear from one of my
> customers about another error.
>
> I have been going into the code and I have changed this area by
> creating a variable to hold the values to use in those routines where
> the field values worked before.
>
> I am still somewhat concerned that I have other areas of the program
> where the code worked with the BDE and may not with IBOojects due to
> this discrepency, so I am going through about 148,000 of application
> code to find other areas of I may posting data and using the values
> from a query as I did before.
>
> Best Regards
>
> Jack
the query?
In which case you should check the Query Commit Action so it's not set to
caClose which will close the query - make it caRefresh so you still have the
query open til you manually close it.
Also set the Transaction AutoCommit to False if you've mistakenly set it to
True
Alan