你好當我運行我的服務器應用程序,連接不打開 - >我的數據集仍然關閉ASP.NET數據庫連接
Dim strconnect As String = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + "rootPath" + "\" + "VSS_TESTDB.mdb" + "Persist Security Info=False"
Dim objConnection As New OleDbConnection(strconnect)
Dim sql As String = "SELECT VSS_Files.id, VSS_Files.filename,VSS_Files.dateOfCreation,VSSDirs.dir FROM VSS_Files , VSSDirs Where VSS_Files.dir_id = VSSDirs.id;"
Dim cmd As New OleDbCommand(sql, objConnection)
Dim myDataReader As OleDbDataReader
myDataReader = cmd.ExecuteReader()
我能做些什麼?
問候tyzak
嗨,對不起,我發佈了一些更多的代碼: Dim strconnect As String =「Provider = Microsoft.Jet.OLEDB.4.0;」 +「DataPath =」+「rootPath」+「\」+「VSS_TESTDB.mdb」+「Persist Security Info = False」 Dim objConnection As New OleDbConnection(strconnect) Dim sql As String =「SELECT VSS_Files.id ,VSS_Files.filename,VSS_Files.dateOfCreation,VSSDirs.dir FROM VSS_Files,VSSDirs其中VSS_Files.dir_id = VSSDirs.id;「 昏暗CMD作爲新的OleDbCommand(SQL,objConnection) 昏暗myDataReader作爲OleDbDataReader myDataReader = cmd.ExecuteReader() – Tyzak