could not find installable isam in asp
I want to insert data in to access database using asp code.When I m trying to do this internet explorer give me error i.e. "could not find installable isam"
<html>
<body>
<%
Dim conn
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0;UID=;PWD="
conn.Open "c:/webdata/northwind.mdb"
Dim sql,str
Response.Write("Hi")
sql="INSERT INTO customers (customerID,companyname,"
sql=sql & "contactname,address,city,postalcode,country)"
sql=sql & " VALUES "
sql=sql & "('" & Request.Form("custid") & "',"
sql=sql & "'" & Request.Form("compname") & "',"
sql=sql & "'" & Request.Form("contname") & "',"
sql=sql & "'" & Request.Form("address") & "',"
sql=sql & "'" & Request.Form("city") & "',"
sql=sql & "'" & Request.Form("postcode") & "',"
sql=sql & "'" & Request.Form("country") & "')"
on error resume next
conn.Execute sql,recaffected
if err<>0 then
开发者_Go百科 Response.Write("No update permissions!")
else
Response.Write("<h3>" & recaffected & " record added</h3>")
end if
conn.close
%>
</body>
</html>
This usually means that the Microsoft Data Access Components are not installed or are corrupted.
http://databases.aspfaq.com/database/how-do-i-solve-could-not-find-installable-isam-errors.html
Download and install the latest MDAC: http://www.microsoft.com/download/en/details.aspx?id=5793
In this case I would say the problem is because you have UID and PWD in your provider statement. Also the OleDb Jet provider uses User Id and Password instead of UID and PWD.
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0;"
conn.Open "C:\webdata\northwind.mdb"
OR
set conn=Server.CreateObject("ADODB.Connection")
conn.ConnectionString="Microsoft.Jet.OLEDB.4.0;Data Source=C:\webdata\northwind.mdb;User Id=;Password=;"
conn.Open
精彩评论