Print Thread
Help Insert into a Grid
#445 04/11/00 12:19 AM
Joined: Apr 2000
Posts: 5
Montreal,Quebec,Canada
T
Tasador Offline OP
Member
OP Offline
Member
T
Joined: Apr 2000
Posts: 5
Montreal,Quebec,Canada
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


------------------

Re: Help Insert into a Grid
#446 04/11/00 07:14 PM
Joined: Aug 1999
Posts: 22,206
Member
Offline
Member
Joined: Aug 1999
Posts: 22,206
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


Marco Kalter
Allround Automations
Re: Help Insert into a Grid
#447 04/12/00 12:17 AM
Joined: Apr 2000
Posts: 5
Montreal,Quebec,Canada
T
Tasador Offline OP
Member
OP Offline
Member
T
Joined: Apr 2000
Posts: 5
Montreal,Quebec,Canada
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

Re: Help Insert into a Grid
#448 06/21/00 09:31 PM
Joined: Jun 2000
Posts: 13
B
Member
Offline
Member
B
Joined: Jun 2000
Posts: 13
[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.

Re: Help Insert into a Grid
#449 07/14/00 11:01 PM
Joined: Jul 2000
Posts: 3
Lexington, KY, USA
H
Member
Offline
Member
H
Joined: Jul 2000
Posts: 3
Lexington, KY, USA
[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.


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.032s Queries: 14 (0.009s) Memory: 2.5170 MB (Peak: 3.0393 MB) Data Comp: Off Server Time: 2024-04-27 09:20:22 UTC
Valid HTML 5 and Valid CSS