Click here to Skip to main content
15,356,705 members
Home / Discussions / C#
   

C#

 
GeneralRe: Mysql Update Query Error Pin
Richard MacCutchan20-Mar-22 23:50
mveRichard MacCutchan20-Mar-22 23:50 
GeneralRe: Mysql Update Query Error Pin
Dave Kreskowiak21-Mar-22 2:29
mveDave Kreskowiak21-Mar-22 2:29 
Generalmysql delete code error Pin
N Mohamed rafi19-Mar-22 16:36
MemberN Mohamed rafi19-Mar-22 16:36 
GeneralRe: mysql delete code error Pin
Dave Kreskowiak19-Mar-22 17:54
mveDave Kreskowiak19-Mar-22 17:54 
GeneralRe: mysql delete code error Pin
N Mohamed rafi19-Mar-22 18:01
MemberN Mohamed rafi19-Mar-22 18:01 
GeneralRe: mysql delete code error Pin
Dave Kreskowiak19-Mar-22 18:39
mveDave Kreskowiak19-Mar-22 18:39 
GeneralRe: mysql delete code error Pin
N Mohamed rafi19-Mar-22 19:48
MemberN Mohamed rafi19-Mar-22 19:48 
AnswerRe: mysql delete code error Pin
OriginalGriff19-Mar-22 21:04
mveOriginalGriff19-Mar-22 21:04 
Use the debugger.
Put a breakpoint on the ExecuteNonQuery line:
cmd.ExecuteNonQuery();
and when it hits, look closely at exactly what is in the three variables id, name, and salary.
Then go to your MySql management software and run a SELECT to seem how many records match that criteria.
If it's zero, then no rows will be deleted.
Back to Visual studio, and use step over to execute the ExecuteNonQuery line.
Back to the DB management, and run the query again.
How many rows this time?

If it hasn't changed, then go back to your code and look at it really carefully ... does "-" have the same effect as "="?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

GeneralRe: mysql delete code error Pin
N Mohamed rafi19-Mar-22 23:05
MemberN Mohamed rafi19-Mar-22 23:05 
GeneralRe: mysql delete code error Pin
OriginalGriff19-Mar-22 23:35
mveOriginalGriff19-Mar-22 23:35 
GeneralRe: mysql delete code error Pin
N Mohamed rafi20-Mar-22 0:02
MemberN Mohamed rafi20-Mar-22 0:02 
GeneralRe: mysql delete code error Pin
OriginalGriff20-Mar-22 0:37
mveOriginalGriff20-Mar-22 0:37 
GeneralRe: mysql delete code error Pin
Richard MacCutchan20-Mar-22 2:13
mveRichard MacCutchan20-Mar-22 2:13 
GeneralRe: mysql delete code error Pin
N Mohamed rafi20-Mar-22 2:21
MemberN Mohamed rafi20-Mar-22 2:21 
GeneralRe: mysql delete code error Pin
Richard MacCutchan20-Mar-22 2:25
mveRichard MacCutchan20-Mar-22 2:25 
GeneralRe: mysql delete code error Pin
N Mohamed rafi20-Mar-22 1:58
MemberN Mohamed rafi20-Mar-22 1:58 
GeneralRe: mysql delete code error Pin
OriginalGriff20-Mar-22 2:33
mveOriginalGriff20-Mar-22 2:33 
GeneralRe: mysql delete code error Pin
N Mohamed rafi20-Mar-22 2:46
MemberN Mohamed rafi20-Mar-22 2:46 
GeneralRe: mysql delete code error Pin
OriginalGriff20-Mar-22 3:26
mveOriginalGriff20-Mar-22 3:26 
GeneralRe: mysql delete code error Pin
N Mohamed rafi20-Mar-22 3:46
MemberN Mohamed rafi20-Mar-22 3:46 
GeneralRe: mysql delete code error Pin
N Mohamed rafi20-Mar-22 2:47
MemberN Mohamed rafi20-Mar-22 2:47 
GeneralRe: mysql delete code error Pin
N Mohamed rafi20-Mar-22 3:09
MemberN Mohamed rafi20-Mar-22 3:09 
GeneralRe: mysql delete code error Pin
Dave Kreskowiak20-Mar-22 4:51
mveDave Kreskowiak20-Mar-22 4:51 
GeneralConnection string Error VS to Mysql Pin
N Mohamed rafi18-Mar-22 20:32
MemberN Mohamed rafi18-Mar-22 20:32 
GeneralRe: Connection string Error VS to Mysql Pin
OriginalGriff18-Mar-22 21:04
mveOriginalGriff18-Mar-22 21:04 

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.