找不到可安装ISAM(Could not find installable ISAM)

2019-09-19 12:12发布

我想创建我的网页与第一搜索功能

<form id="form1" name="form1" method="get" action="mySearchResults.asp">
  <label>Enter Keywords:`
  <input type="text" name="searchTerm" />`
  </label>`
  <p>
    <input type="submit" name="Submit" value="Submit" />
  </p>
</form>

然后

<% 
'open the connection
Dim Connect, myRecordSet
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Open = "Provider=Microsoft.Jet.OLEDB.4.0;Database='SVCS.mdb'"
%>

<%
'collect the form input
searchInput = Request.QueryString("searchTerm")`

'check for a match
Set myRecordSet = Connect.Execute ("SELECT * FROM Inventory WHERE myColumn LIKE '%" & searchInput & "%'")


'display the results
if myRecordSet.EOF then
response.write("You searched for: " & searchInput & "<br>")
response.write("A match was not found.<br>Sorry try again.")
else
response.write("You searched for: " & searchInput & "<br>")
response.write("The record was found!<br>The match is: " & myRecordSet("myColumn"))
end if
%>
<br><br>
<a href="mySearchForm.asp">Try Again</a> 

而错误的是

Microsoft JET Database Engine error '80004005' 
Could not find installable ISAM. 
/sarah lee video club website/mySearchResults.asp, line 5

请告诉我如何解决这个

Answer 1:

你不应该一件事引用数据库名称,它是数据源,而不是数据库,你不需要与Open等号。

Set con = Server.CreateObject("ADODB.Connection") 
con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=SVCS.mdb"

又见http://connectionstrings.com



文章来源: Could not find installable ISAM