Home > Net >  SQL insert date grammatical errors
SQL insert date grammatical errors

Time:09-22

Which write wrong at this moment, the syntax error
Int res2=db. Ado. ExecuteCommand ($" INSERT INTO TransHistory (Tel, OutAmount, CreateDate) VALUES ({Tel}, {OutSum}, '{DateTime. Now the ToShortDateString (). The ToString ()}' ");

CodePudding user response:

What type of CreateDate

CodePudding user response:

You end up working as a brackets
Int res2=db. Ado. ExecuteCommand ($" INSERT INTO TransHistory (Tel, OutAmount, CreateDate) VALUES ({Tel}, {OutSum}, '{DateTime. Now the ToShortDateString (). The ToString ()}' ) ");
  •  Tags:  
  • C#
  • Related