Hi,

I have a dataset created by dragging table from database explorer. Then I
have added a column in dataset with expression cant * price in order to get
calculation from two columns.

This work fine.

But when I try to save data into database using datadapter.update method i
get the error:
Cannot change ReadOnly Property for expression column.

Anyone can help me?

Thanks.

Re: Error saving data from dataset with expression column by Cor

Cor
Thu Jun 23 07:13:42 CDT 2005

JMBC,

>
> But when I try to save data into database using datadapter.update method i
> get the error:
> Cannot change ReadOnly Property for expression column.
>
I assume that this is not a way trying to update an expression column in a
database?

Normally is that column not affected in the update.

Cor



Re: Error saving data from dataset with expression column by JMBC

JMBC
Thu Jun 23 08:14:05 CDT 2005

NO. The calculated column is not used in any sql statement of the dataadapter.

"Cor Ligthert" wrote:

> JMBC,
>
> >
> > But when I try to save data into database using datadapter.update method i
> > get the error:
> > Cannot change ReadOnly Property for expression column.
> >
> I assume that this is not a way trying to update an expression column in a
> database?
>
> Normally is that column not affected in the update.
>
> Cor
>
>
>

Re: Error saving data from dataset with expression column by JMBC

JMBC
Thu Jun 23 09:15:01 CDT 2005

Hi,

Finally I have found the response in this site:
http://www.dotnet247.com/247reference/msgs/8/44850.aspx

The problem is caused by the select statement added to the update and insert
command by the dataadapter wizard. Deleting these selects all work fine.

Thanks
JMBC

Re: Error saving data from dataset with expression column by Cor

Cor
Thu Jun 23 11:16:59 CDT 2005

JMBC,

I seldom use the wizard, however thanks for your information. Reading it, it
becomes very clear.

Cor