Link to home
Start Free TrialLog in
Avatar of FCapo
FCapo

asked on

vb.net expression

Hi,

In the Visual Studio dataset designer, in a specific table, I added an expression to my SQL statement, just to get only part of a string
SELECT        soumissionNumber, sDate, sClient, sProjet, sMandat, sClientId, mid(soumissionNumber, 9, 11) AS Expr1
FROM            soumissions

Open in new window


Once I did this I can't update,save or delete records in the table anymore, I get the following error: Concurrency violation: the UpdateCommand affected 0 of the expected 1 records.

My database is an access database

Thanks for the help!
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

I have never used the designer but your error is that the column from the expression cannot be updated. You will need to create another command to update your table.
SOLUTION
Avatar of Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger)
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of FCapo
FCapo

ASKER

Hi Jacques,

How would I do this with a datatable, I'm just looking to have a column with this expression : mid(soumissionNumber, 9, 11) AS Expr1
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial