【发布时间】:2017-11-15 15:05:16
【问题描述】:
我是 mvc 新手,正在尝试使用 mvc 将我的 mysql 数据库连接到应用程序。
我的连接字符串是 as-
<connectionString>
<add name ="Controlsheetlogin" connectionString="Server=localhost; database=test;User Id=root;password=123"/>
</connectionString>
并且在 MySql.Data.MySqlClient.MySqlCommand 中出现错误 提前感谢您的帮助。
【问题讨论】:
-
您可以改为搜索该错误。也许 Stack Overflow 上有一个问题可以帮助您解决这个具体案例。
-
如果相关错误,您能否发布出现错误的 C# 方法?
-
在文本中包含异常会很有帮助。
-
string constr = ConfigurationManager.ConnectionStrings["abc"].ConnectionString using (MySqlConnection con = new MySqlConnection(constr)) { using (MySqlCommand cmd = new MySqlCommand() ) 使用时出错跨度>
标签: c# mysql asp.net asp.net-mvc asp.net-mvc-4