我只需要将查询的值保存为String。我似乎找不到按照我需要的方式获取数据的方法。
Public Class frmEndJob
Friend Sub goBtn_Click(sender As Object, e As EventArgs) Handles goBtn.Click
Dim mName As String
mName = frmMain.SWOT.ExecuteSQL("SELECT cMachine FROM machine WHERE cidMachine=`" & machineName.SelectedValue & "`")
End Sub
End Class
我的数据库信息正在保存在frmMain
中Imports SQL_Database
Public Class frmMain
Public SWOT As cMySQL = New cMySQL("server=fake; user id=faker; password=fakePw; database=faekDB; pooling=false; allow user variables=true; oldguids=true")
End Class