Subject Re: [IBO] loosing records Help
Author Daniel Bertin
thanks,
that is not what is happening. the edits are actually done in a
wwrecordviewdialog and the edit checks also
the onclose event of this dialog i assign to these variables the resulting
field content.at that time the content is correct no need to further edit.

I assign some flags, then assign the field values to variables.
then insert a new record and assign it's field with the variables and post.
I think this is where i'm not posting correctly.

but you mention a IBOdatabase component, I don't have one in my datamodule
, can that be a problem, how do connect/use a IBOdatabase and i have a
transaction component , or is the default transaction ok, and how should I
use it?

this application was a conversion from a progress DB,BDE to IBO and IB/FB
and I not to familiar with the workings of IBO(obviously,but learning)
can I still insert IBODatabase and connect in the datamodule?

At 09:52 PM 10/01/2002 +1100, you wrote:
> > here is basically the code in a close event;
>...
>
>There are lots of issues that I could raise with this code, not least
>of which is question why you are not using data aware controls to feed
>the table records more directly. But lets avoid all that for the
>moment...
>
>Here is a pseudo version of your code, to try and see what you
>are doing...
>
> start editing table1 // (1)
> assign one field // (2)
> if user confirms then
> begin
> assign more fields
> post the record
> start inserting to table1
> assign lots offields
> post the record
> end
> else
> begin
> assign another field // (3)
> end
>
>One thing that becomes more obvious in this cut down version is that
>you do NOT post the field assignments indicated as (2) and (3) above.
>So whatever you expected to happen there will not happen. Indeed the
>call to edit should be moved inside the confirm block.
>
>When you start editing (1), how do you know what record you are
>editing?
>
>
> > where/how would I make sure that this commits to the database table?
> > there is a CommitAction property on IBOTable1 set to
> > caValidateCursor?
>
> From the sounds of things you are relying on the default transaction
>inside TIBODatabase. Presumably you have IBODatabase.AutoCommit set to
>true? If not then you need to call IBODatabase.Commit; at the end of
>the above.
>
>
> > the users have reported some ISC errors but I was trying to capture
> > them, but don't know how to resume operation;
>
>Some of these errors could be coming from inappropriate ways of
>constructing and destroying forms and datamodules. Without seeing all
>of your application it is difficult to say for certain.
>
>For example you mention that the above code is in an OnClose event for
>a form - given the prompting I would have expected that you would have
>used OnCloseQuery and given a cancel option to abort the close.
>Exceptions occuring inside the OnClose event could have unpredictable
>results. However there is not enough of your application there to see
>exactly what you are doing and how that may generate the errors we are
>seeing.
>
>The network errors could be almost anything. Bugs in your app,
>network problems, the server aborting. To check for server aborts
>look at the Interbase.log file in the firebird installation directory
>on the server.
>
>The error with the IP control (wwcombobox) is strange, perhaps it is
>as a result of some other error or perhaps there is a bug in the IP
>code, I have no way to tell.
>
>
>Not sure how much help this is, without understanding more of the
>application it is difficult to be more specific.
>
>--
>Geoff Worboys - TeamIBO
>Telesis Computing
>
>
>___________________________________________________________________________
>IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
>___________________________________________________________________________
><http://www.ibobjects.com>http://www.ibobjects.com - your IBO community
>resource for Tech Info papers,
>keyword-searchable FAQ, community code contributions and more !
>
>Your use of Yahoo! Groups is subject to the
><http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.


[Non-text portions of this message have been removed]