且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用C#插入记录到MySQL数据库

更新时间:2023-02-07 18:04:05

在您paramters尝试:

In your paramters try:

cmd.Parameters.Add(new OdbcParameter("@softwareID", softwareID));



等等,等等你的参数的其余部分。

And so on and so forth with the rest of your parameters.

和在所有诚实它可能是一样简单只是不带参数建立你的SQL内联和执行命令,除非你没有验证文字和关心注入攻击。

And in all honesty it might be just as simple just to build your sql inline and execute the command without parameters unless your not validating text and are concerned about injection attacks.