Home > Net >  C # query conditions, there is a problem, give advice or comments for bosses.
C # query conditions, there is a problem, give advice or comments for bosses.

Time:09-25

Novice just contact with c #, want to be a student management system, the code is always in the red line not line, who taught, what went wrong?

CodePudding user response:

No you'd give abnormal screenshot, or how do you know what is wrong

CodePudding user response:

Where the front and a space to see see

CodePudding user response:

Abnormal can't see you, not sure what is the problem, but I see you last splicing database statements "string SQL=" select * from infor + conditiong "" there might be a little small problems, behind the" infor "knock a space you try (remember in double quotation marks on the blank space, or no meaning), it is possible that the program at the time of joining together the statement" infor "behind a space leads to less patchwork statement is wrong, is originally" select * from infor where... ", as a result, the program to cobble together into "select * from inforwhere... ". This database right there is, of course, identify your statement,

CodePudding user response:

In SQL=the string line break point, after the operation, the value of the SQL copy out, put in your SQL query window operation, abnormal will tell you where the SQL error,

CodePudding user response:

Upstairs in teach you how to catch fish, good good study

CodePudding user response:

 "select * from infor" + conditiong; 

CodePudding user response:

Fifth floor positive solution, this is the basic skill,

CodePudding user response:

1. Don't give an error results don't see error
2. Shouldn't be a person to learn the computer breakpoint debugging is play rascal

CodePudding user response:

Your SQL directly in the database directly
  •  Tags:  
  • C#
  • Related