How to add Application name to ?

后端 未结 3 430
遇见更好的自我
遇见更好的自我 2021-01-25 06:21

This is my app.config file looks like:



    
      

        
3条回答
  •  臣服心动
    2021-01-25 07:06

    I have figured out the problem Myself after a lot of hair pulling and found the solution that I have changed my code in this way:

     cmd.CommandText = "INSERT INTO Users ( Username,ApplicationName,Password, 
        Email, PasswordQuestion, PasswordAnswer) VALUES(@Username,@ApplicationName,@Password,
        @Email,@PasswordQuestion,@PasswordAnswer)"
    

    And add another Param this way:

     Dim param6 As New SqlParameter()
     param6.ParameterName = "@ApplicationName"
     param6.Value = txtApplicationName.Text.Trim()
     cmd.Parameters.Add(param6)
    

    I know this not the best way If anyone found any other best solution let me know.

提交回复
热议问题