C# with MySQL INSERT parameters

后端 未结 9 1972
-上瘾入骨i
-上瘾入骨i 2020-11-28 10:47

Good day to all, I\'m using Visual C# 2010 and MySQL Version 5.1.48-community. I hope you can help me with this code. I don\'t find it working on me. What am I missing?

9条回答
  •  悲&欢浪女
    2020-11-28 11:29

    Use the AddWithValue method:

    comm.Parameters.AddWithValue("@person", "Myname");
    comm.Parameters.AddWithValue("@address", "Myaddress");
    

提交回复
热议问题