|
No. It’s not a primary key column.
The table is perfectly normal in every regard, except it also has a computed column – this is a column that’s value is calculated from the values of other columns. I’m not sure if this is a feature unique to MS SQL 2K…
You can read the value of a computed column, but if you try to set the value using an insert or update statement, you will get an sql error.
I suppose I should update the example below:
CREATE TABLE prices( priceID int IDENTITY(1,1) PRIMARY KEY CLUSTERED, retail money, sale money, cost_diff AS (retail – sale) )
-----Original Message-----
Are you trying to modify
a primary key column? On 10/4/06, Gareth Cole <[EMAIL PROTECTED]> wrote: Hi,
I was wondering if anyone could help me with this? When I try to save a record where the table has a computed column, I get the error: "Column 'xxxxxxxx' cannot be modified because it is a computed column."
I'm a bit stuck with this one, as I can't re-write the table this time. Would it be possible to over-write the save() method in some way? Ideally, reactor should just ignore a computed column when it generates it's insert and update statements. I'm not sure if it can get this info from the sql server.
Any help is appreciated
Thanks
-----Original
Message-----
Hi Folks,
Apologies if this has been asked before, but does reactor work with computed columns?
An example column would be: CREATE TABLE prices( retail money, sale money, cost_diff AS (retail – sale) )
In the case of cost_diff column, you would want reactor to create a getter method, but not a setter.
Thanks,
Gareth -- Reactor for ColdFusion Mailing List -- [email protected]
-- Archives at http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [email protected] Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |
- [Reactor For CF] computed columns Gareth Cole
- [Reactor for CF] RE: [Reactor For CF] computed columns Gareth Cole
- Re: [Reactor for CF] RE: [Reactor For CF] computed col... Teddy Payne
- RE: [Reactor for CF] RE: [Reactor For CF] computed... Gareth Cole
- Re: [Reactor for CF] RE: [Reactor For CF] computed... Teddy Payne
- Re: [Reactor for CF] RE: [Reactor For CF] computed col... Sean Corfield
- Re: [Reactor for CF] RE: [Reactor For CF] computed col... Chris Phillips

