My MS Access database won't update asp.net

后端 未结 1 819
醉话见心
醉话见心 2021-01-28 13:40

I\'m trying to update my database without success. This is how my table looks:

https://i.stack.imgur.com/Q6EDk.png

After opening the modal its look like this:

1条回答
  •  伪装坚强ぢ
    2021-01-28 14:38

    you just check your update query:
    string SqlString = "UPDATE ProductList SET Pname = ?";
    
    change to this:
    string SqlString = "UPDATE ProductList SET Pname =@Pname ";
    
    and change command parameter to pass scaler variable:
     cmd.Parameters.AddWithValue("@Pname", prdname.Text);
    

    0 讨论(0)
提交回复
热议问题