Click here to Skip to main content
15,887,444 members
Home / Discussions / C#
   

C#

 
Questionupdate command in sqladapter Pin
Moneyzz Sharma6-Mar-14 4:04
Moneyzz Sharma6-Mar-14 4:04 
AnswerRe: update command in sqladapter Pin
OriginalGriff6-Mar-14 4:39
mveOriginalGriff6-Mar-14 4:39 
SuggestionRe: update command in sqladapter Pin
Richard Deeming6-Mar-14 5:05
mveRichard Deeming6-Mar-14 5:05 
GeneralRe: update command in sqladapter Pin
OriginalGriff6-Mar-14 5:10
mveOriginalGriff6-Mar-14 5:10 
QuestionRe: update command in sqladapter Pin
Moneyzz Sharma6-Mar-14 5:35
Moneyzz Sharma6-Mar-14 5:35 
AnswerRe: update command in sqladapter Pin
OriginalGriff6-Mar-14 6:29
mveOriginalGriff6-Mar-14 6:29 
GeneralRe: update command in sqladapter Pin
Moneyzz Sharma6-Mar-14 8:14
Moneyzz Sharma6-Mar-14 8:14 
GeneralRe: update command in sqladapter Pin
OriginalGriff6-Mar-14 8:27
mveOriginalGriff6-Mar-14 8:27 
OK...combine the two comments I've given you and you have the answer.

Let's go back a stage or so, and look at a simple WHERE clause.
SQL
SELECT * FROM MyTable WHERE MyColumn=Value

The WHERE clause is "MyCoumn=Value" and it evaluates to a boolean: true or false
If it is true then the row is SELECTed (in this case, it could be UPDATEd in a different statement, such as yours) If it is false then it isn't.

The simple boolean test here is in three parts: "X = Y" where
X   is saying which column of the row is to be compared
=   is saying the the left and right sides must be the same
Y   is the value to compare against the column

Working this back to your UPDATE, you have a three part WHERE clause, each part being of this form, and converted to a more complex test by AND to ensure that all three conditions must be true in order to update the row.

Each part is of the same form as my example above: "X = Y"
[name] = @P4
[id] = @P5
[salary] = @P6

If you change the names, it will check against different columns.
The part on the right is just the identifier of the parameter - it matches the name you use in your C# code to supply the actual value - look back at the first comment I made and it should be clear.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)

QuestionTranslating an "error event" to a managed exception Pin
Bernhard Hiller5-Mar-14 4:17
Bernhard Hiller5-Mar-14 4:17 
AnswerRe: Translating an "error event" to a managed exception Pin
Ravi Bhavnani5-Mar-14 4:25
professionalRavi Bhavnani5-Mar-14 4:25 
GeneralRe: Translating an "error event" to a managed exception Pin
OriginalGriff5-Mar-14 4:38
mveOriginalGriff5-Mar-14 4:38 
GeneralRe: Translating an "error event" to a managed exception Pin
Ravi Bhavnani5-Mar-14 4:46
professionalRavi Bhavnani5-Mar-14 4:46 
GeneralRe: Translating an "error event" to a managed exception Pin
OriginalGriff5-Mar-14 5:13
mveOriginalGriff5-Mar-14 5:13 
GeneralRe: Translating an "error event" to a managed exception Pin
BobJanova5-Mar-14 5:46
BobJanova5-Mar-14 5:46 
AnswerRe: Translating an "error event" to a managed exception Pin
Shameel5-Mar-14 5:07
professionalShameel5-Mar-14 5:07 
AnswerRe: Translating an "error event" to a managed exception Pin
BobJanova5-Mar-14 5:53
BobJanova5-Mar-14 5:53 
AnswerExceptions are exceptional Pin
Ennis Ray Lynch, Jr.5-Mar-14 8:58
Ennis Ray Lynch, Jr.5-Mar-14 8:58 
AnswerRe: Translating an "error event" to a managed exception Pin
jschell5-Mar-14 9:41
jschell5-Mar-14 9:41 
GeneralRe: Translating an "error event" to a managed exception Pin
Bernhard Hiller5-Mar-14 20:17
Bernhard Hiller5-Mar-14 20:17 
QuestionPlease help me. don't working save button Pin
bayaa4-Mar-14 23:03
bayaa4-Mar-14 23:03 
SuggestionRe: Please help me. don't working save button Pin
Richard Deeming4-Mar-14 23:13
mveRichard Deeming4-Mar-14 23:13 
GeneralMessage Closed Pin
6-Mar-14 3:15
FesAlex6-Mar-14 3:15 
GeneralRe: Please help me. don't working save button Pin
Pete O'Hanlon6-Mar-14 3:32
mvePete O'Hanlon6-Mar-14 3:32 
GeneralRe: Please help me. don't working save button Pin
thatraja6-Mar-14 3:59
professionalthatraja6-Mar-14 3:59 
GeneralRe: Please help me. don't working save button Pin
bayaa6-Mar-14 16:09
bayaa6-Mar-14 16:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.