Print Thread
Stored column in ToracleDataSet
#4374 12/19/02 06:28 PM
Joined: Dec 2002
Posts: 5
PARIS
L
Member
OP Offline
Member
L
Joined: Dec 2002
Posts: 5
PARIS
Hello,
I want to know if it's possible to create a column in TOracleDataset that stores value which is neither calculated nor a database field. The values in this column could be used just to be displayed and not to be stored in a database.
Thanks

Re: Stored column in ToracleDataSet
#4375 12/19/02 08:26 PM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
That is what calculated fields are for. Or am I missing something?

Edit: If you want to store a value, you can use an InternalCalc field.

[This message has been edited by mkalter (edited 19 December 2002).]


Marco Kalter
Allround Automations
Re: Stored column in ToracleDataSet
#4376 12/19/02 08:41 PM
Joined: Dec 2002
Posts: 5
PARIS
L
Member
OP Offline
Member
L
Joined: Dec 2002
Posts: 5
PARIS
With a multi-threads listening system, the client application is notified by the Oracle database (by trigger) when a record is changed by another user. We just want to create a column named 'CHANGED' and set to 'Y' the record which has changed.
If I create a calculated field and set the field with the instruction :
OracleDataSet1CHANGED.Value := 'Y' ;
When I scroll, the column is re-calculated and the value 'Y' disapear. The value is not stored.

Re: Stored column in ToracleDataSet
#4377 12/19/02 08:42 PM
Joined: Dec 2002
Posts: 5
PARIS
L
Member
OP Offline
Member
L
Joined: Dec 2002
Posts: 5
PARIS
With a multi-threads listening system, the client application is notified by the Oracle database (by trigger) when a record is changed by another user. We just want to create a column named 'CHANGED' and set to 'Y' the record which has changed.
If I create a calculated field and set the field with the instruction :
OracleDataSet1CHANGED.Value := 'Y' ;
When I scroll, the column is re-calculated and the value 'Y' disapear. The value is not stored.

Re: Stored column in ToracleDataSet
#4378 12/20/02 09:29 PM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
You should use an InternalCalc field (fkInternalCalc) instead of a Calculated field (fkCalculated).

That should probably do the trick.

------------------
Marco Kalter
Allround Automations


Marco Kalter
Allround Automations
Re: Stored column in ToracleDataSet
#4379 01/06/03 09:25 PM
Joined: Nov 2002
Posts: 19
France
P
Member
Offline
Member
P
Joined: Nov 2002
Posts: 19
France
Hello

I try to create an InternalCalc field. I have the following error : "OracleDataset1 : Field "MyFieldName" not found.

How i do :
1

Re: Stored column in ToracleDataSet
#4380 01/06/03 11:26 PM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
You need to include a calculated field in the SQL text of your query, of the appropriate data type and size. This field can be set to fkInternalCalc, and can be manipulated.

------------------
Marco Kalter
Allround Automations


Marco Kalter
Allround Automations
Re: Stored column in ToracleDataSet
#4381 01/07/03 01:35 PM
Joined: Nov 2002
Posts: 19
France
P
Member
Offline
Member
P
Joined: Nov 2002
Posts: 19
France
Exact. You are right.
I set this select text : select rowid,col1,col2,'' calcCol from atable

I set calcCol to fkInternalCalc.

Important note : don't forget to do an edit before setting a value to calcCol.

Thanks.

[quote]Originally posted by mkalter:
You need to include a calculated field in the SQL text of your query, of the appropriate data type and size. This field can be set to fkInternalCalc, and can be manipulated.

[/quote]


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.053s Queries: 13 (0.014s) Memory: 2.5301 MB (Peak: 3.0418 MB) Data Comp: Off Server Time: 2024-05-21 19:22:56 UTC
Valid HTML 5 and Valid CSS