Expressions and their limitations

  • Thread starter Thread starter Woody Splawn
  • Start date Start date
W

Woody Splawn

I am using VB.net in a non Web applications

I have been reading up on expressions and they seem quite helpful. However,
in one book I've read it talks about what appears to be a severe limitation.
The book may have been written before VS 2003 so maybe the issue has been
fixed. I don't know.

What I am told is that "Using expressions in combination with DatRelations
gives you the ability to create a user-friendly form for viewing data.
However, you may find that in some situations the data is not editable".

In some circumstances it appears that if you create a column with an
expression you will not be able to edit that column, which is
understandable; but you may not be able to edit any of the other columns in
the table either. If this is the case, it would appear that expresessions
are severly limited in that they can only be used (Practically) in forms
where there is a view only capacity.

Does someone else have some inforamtion on this that may enlighten me?

Thank You
 
Columns based on expressions are never editable in any API where you
care about data consistency. If you create the expression in T-SQL,
that column isn't editable either when it's pulled down in a result
set. For example, let's say your expression in column C computes a
total from column A and column B. If editing were allowed on column C,
then your data becomes meaningless because it longer represents the
sum of A and B.

--Mary
 
I have used expressions heavily in my program's in tandem with editable
datafields and have worked like a charm. I do agree with mary that you
should never be able to change the value of an expression.
 
Understood.

Columns based on expressions should not be editable. The information I
read, however, seemed to indicate that you may not be able to edit even
columns that are not based on expressions. I either misuderstood what was
being said or it was said in a way that is not correct.

One response to thread indicated they have no such problems. Maybe it's
much ado about nothing.
 
In that case, I think the operable word here is "may" when it comes to
editing non-computed columns in the row. Gary does't seem to have had
any problems, so I wouldn't worry about it unless it comes up at some
point, and then you'll know what the cause is.

--Mary
 
Back
Top