应用程序与mysql出错
下面的代码在运行中出现了:未处理的“System.NullReferenceException”类型的异常出现在 mysql.data.dll 中。请各位大侠帮忙指教下
Imports System.Web
Imports System
Imports System.threading
Module Module1
Sub main()
Dim sql As String = System.Configuration.ConfigurationSettings.AppSettings("sql_data")
Dim cn As New MySqlConnection(sql)
If cn.State = ConnectionState.Closed Then cn.Open()
sql = "select ac_id,year(ac_create_date)as stryear,month(ac_create_date) as strmonth,day(ac_create_date)as strday,ac_create_date,ac_mnc,ac_ntc,ac_vat,ac_balance,bc_bindcalled from e_account inner join e_bindcalled on ac_id=bc_acctid where ac_status=1 "
Dim ap As New MySqlDataAdapter(sql, cn)
Dim ds As New DataSet
ap.Fill(ds, "e_account")
cn.close()
end sub
end module --------------------编程问答-------------------- 我怎么用VS2005就打不开MYSQL数据库?总是提示连接失败.LZ是如何实现的?
补充:.NET技术 , VB.NET