|
Post by didier on Jul 17, 2009 11:48:13 GMT -5
Here is an UPDATE SQL statement: UPDATE categories SET Description = 'Ahaha' WHERE CategoryID = 19 Here is the current Linqer translation: Dim queryCategories = _ From t In db.Categories _ Where _ CLng(t.CategoryID) = 19 _ Select t For Each t As Categories In queryCategories t.Description = "Ahaha" Next db.SubmitChanges() 1 - In VB, the 6th line "For Each t As Categories In queryCategories" shows an error: the As Categories part is refused. If I get rid of it the statement works like a charm! 2 - I would suggest that, as the WHERE clause involves the Table's primary key with an "=" operator, you know there will be just ONE answer. Subsequently to replace the for each loop with a dim t = queryCategories.single Or am I too demanding?
|
|
|
Post by Mikhail Oumantsev on Jul 21, 2009 20:11:40 GMT -5
1. This must be C# syntax mixture. I will fix it in the next rfelease.
2. That involves additional parsing and I would like to keep the same structure for all queries.
|
|