myprogram.exe中发生未处理的“System.InvalidOperationException”类型异常
其他信息:创建表单时出错。有关详细信息,请参阅Exception.InnerException。错误是:无法加载文件或程序集“System.Data.dll”或其依赖项之一。不是有效的Win32应用程序。 (HRESULT异常:0x800700C1)
Imports System.Management
Imports MySql.Data.MySqlClient
Imports AutoUpdaterDotNET
Imports System.Net
Imports System.Text.RegularExpressions
Imports System.Threading
Public Function jokenconn() As MySqlConnection
Return New MySqlConnection("server=localhost;user id=exeportal;password=00000;database=00000")
End Function
我认为这里的问题
Dim cmd As New MySqlCommand
Dim da As New MySqlDataAdapter
Dim con As MySqlConnection = jokenconn()
sql = String.Format("SELECT * FROM `users` WHERE username= '{0}' and status= '{1}'", TextBox1.Text, 1)
.Connection = con
.CommandText = sql
End With
da.SelectCommand = cmd
da.Fill(publictable)
If publictable.Rows.Count > 0 Then
Dim user_type, name As String
If user_type = "" Then
ElseIf user_type = "Encoder" Then
Else
'welcome
End If
Else
MsgBox("error")
End
End If
da.Dispose()
con.Clone()