Posted By: Tasador Help Insert into a Grid - 04/11/00 12:19 AM
I Try to insert in query with a Infopower Grid but when i change my record in the grid the change are cancel and he never goes in the after post Event here is my SQL
Select dr.RowID,
dr.NO_DOCUMENT_REFERENCE,
dr.NO_REVISION_DOC_REF,
dr.NO_PAGE,
dr.NO_TYPE_DOCUMENT_REFERENCE,
dr.IND_EMIS,
dr.DATE_EMISSION,
dr.IND_DISTRIBUE,
dr.DATE_DISTRIBUTION,
-- dr.NO_BM| | ' Pg: ' | | dr.NO_PAGE As NO_DOC,
e.NO_ELEMENT,
:IND_ACTIVE As IND_ACTIVE

From DOCUMENT_REFERENCE dr,
ELEMENT e,
ELEMENT_DESSIN ed,
TR_TYPE_DOCUMENT_REFERENCE tdr

Where 1 = :IND_ACTIVE
And e.NO_ELEMENT = :NO_ELEMENT
And e.IND_REVISION_COURANTE = 1
And ed.NO_ELEMENT = e.NO_ELEMENT
And ed.NO_REVISION_CONTRAT = e.NO_REVISION_ELEMENT
And dr.NO_DOCUMENT_REFERENCE = ed.NO_DOCUMENT_REFERENCE
And dr.IND_REVISION_COURANTE = 1
And dr.IND_EMIS = :IND_EMIS
And tdr.NO_TYPE_DOCUMENT_REFERENCE = dr.NO_TYPE_DOCUMENT_REFERENCE


The properties are : CachedUpdates : true
LockingMode : lockImmediate


------------------
Posted By: Marco Kalter Re: Help Insert into a Grid - 04/11/00 07:14 PM
What exactly happens? You post the new record, and it is cancelled? Does the record disappear? Is there an exception? Does any insert statement occur? (you can check this by setting TOracleDataSet.Debug to True)


------------------
Marco Kalter
Allround Automations
Posted By: Tasador Re: Help Insert into a Grid - 04/12/00 12:17 AM
I put the Debug Option but after fetching the sequence nothing append no Insert sql.

This is my step by step.
Query.Insert
then in then grid i went up and the record disappear without any exception
Posted By: bchau Re: Help Insert into a Grid - 06/21/00 09:31 PM
[quote]Originally posted by Tasador:
I Try to insert in query with a Infopower Grid but when i change my record in the grid the change are cancel and he never goes in the after post Event here is my SQL
Select dr.RowID,
dr.NO_DOCUMENT_REFERENCE,
dr.NO_REVISION_DOC_REF,
dr.NO_PAGE,
dr.NO_TYPE_DOCUMENT_REFERENCE,
dr.IND_EMIS,
dr.DATE_EMISSION,
dr.IND_DISTRIBUE,
dr.DATE_DISTRIBUTION,
-- dr.NO_BM| | ' Pg: ' | | dr.NO_PAGE As NO_DOC,
e.NO_ELEMENT,
:IND_ACTIVE As IND_ACTIVE

From DOCUMENT_REFERENCE dr,
ELEMENT e,
ELEMENT_DESSIN ed,
TR_TYPE_DOCUMENT_REFERENCE tdr

Where 1 = :IND_ACTIVE
And e.NO_ELEMENT = :NO_ELEMENT
And e.IND_REVISION_COURANTE = 1
And ed.NO_ELEMENT = e.NO_ELEMENT
And ed.NO_REVISION_CONTRAT = e.NO_REVISION_ELEMENT
And dr.NO_DOCUMENT_REFERENCE = ed.NO_DOCUMENT_REFERENCE
And dr.IND_REVISION_COURANTE = 1
And dr.IND_EMIS = :IND_EMIS
And tdr.NO_TYPE_DOCUMENT_REFERENCE = dr.NO_TYPE_DOCUMENT_REFERENCE


The properties are : CachedUpdates : true
LockingMode : lockImmediate


[/quote]

Try this,

Set the CachedUpdates property to false. or you may need to leave the current inserted or updated record(by clicking on a different row) in order for the post to take place.
Posted By: hawscs Re: Help Insert into a Grid - 07/14/00 11:01 PM
[quote]Originally posted by bchau:
Try this,

Set the CachedUpdates property to false. or you may need to leave the current inserted or updated record(by clicking on a different row) in order for the post to take place.

[/quote]
Don't think this would work - Post gets called whether CachedUpdates are on or not, and he said it never reached the Post event handler.
© Allround Automations forums