VB6封裝后其他不鏈接資料庫的地方都是正常的。鏈接資料庫的到不到資訊?
請大佬幫忙看看……
asp中
Set rs = Server.CreateObject("adodb.recordset")
rs.Open "select * from QS where Itemmix='" & Itemmix & "' and Qs_Ver1st=" & Qs_VerJJ & " ORDER by id desc", connCTD, 1, 3
ItemNameS = rs("ItemNameS")
可以得到資訊。放入VB6就不行了
進行了如下修改也不行
Dim connCTD
Set connCTD = MyServer.CreateObject("ADODB.Connection")
connCTD.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & MyServer.MapPath("/plan/$CTD#.asp")
Set rs = Server.CreateObject("adodb.recordset")
rs.Open "select * from QS where Itemmix='" & Itemmix & "' and Qs_Ver1st=" & Qs_VerJJ & " ORDER by id desc", connCTD, 1, 3
ItemNameS = rs("ItemNameS")
無法讀取到專案資訊。
uj5u.com熱心網友回復:
還是貼出出錯資訊比較好斷定問題處在哪uj5u.com熱心網友回復:
看上面的代碼理論上不需要怎么改。應該把錯誤資訊貼出來,根據錯誤處理即可。uj5u.com熱心網友回復:
去年的挖墳帖了。很明顯, Server 是 ASP 里面才有的物件,把 Server. 去掉就行了,本地環境也不需要 MapPath轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/17052.html
標籤:ASP
上一篇:求助這個屬性vue怎么洗掉
下一篇:圖片瀑布流+懶加載,如何實作?
