【问题标题】:How do i connect to MySQL from .aspx script如何从 .aspx 脚本连接到 MySQL
【发布时间】:2011-12-23 17:56:37
【问题描述】:

我得到错误:

BC30807: 'Let' and 'Set' assignment statements are no longer supported.

与:

Set objConn = Server.CreateObject("ADODB.Connection")

【问题讨论】:

  • www.google.com/search?q=BC30807

标签: mysql odbc mysqli


【解决方案1】:

像这样:

using MySql.Data.MySqlClient;

MySqlConnection myConnection = new MySqlConnection();

myConnection.ConnectionString = myConnectionString;
myConnection.Open();
//execute queries, etc
myConnection.Close();

myConnectionString 的格式如下:

"Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;"

【讨论】:

  • 谢谢。但是,我现在收到此错误 BC36008:“使用”必须以匹配的“结束使用”结尾。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-04-23
  • 2017-02-12
  • 2018-11-02
  • 1970-01-01
  • 2016-12-29
相关资源
最近更新 更多