一个很深刻的问题(isam)
上午发了一贴,由于找不到错误.后来错误纠正了,却有生成了一个看都看不懂的问题"找不到可安装的 ISAM"程序是没错误的,___________________________________________________________________________________________
错误描述:用insrt向数据库中插入记录,提交后出现错误提示:Exception Details: System.Data.OleDb.OleDbException: 找不到可安装的 ISAM
___________________________________________________________________________________________
问题:难道我少安装了什么ACCESS的组件?ISAM是个什么东东?我用select可以从数据库中查询记录啊!
________________________________________________________________________________________
程序:
<%@ import namespace="system.data"%>
<%@ import namespace="system.data.oledb"%>
<script language="vb" runat="server">
sub enter_click(sender as object,e as eventargs)
dim conn as new oledbconnection("provider=microsoft.jet.oledb.4.0;datasource=" & server.mappath("..\wwwlink"))
dim cmd as new oledbcommand("insert into wwwlink(sitename,url,intro,grade) values(' " & sitename.text & " ',' " &url.text &"',' " &grade.text &" ',cint(" & grade.selecteditem.text & "))",conn)
conn.open()
cmd.executenonquery()
conn.close()
message.text="添加成功"
end sub
</script>
<html>
<body>
<h2 align="center">插入记录</h2>
<table align="center">
<form runat="server">
<tr>
<td>网站名称<td><asp:textbox id="sitename" runat="server"/><tr>
<td>网站地址<td><asp:textbox id="url" runat="server"/><tr>
<td>网站简介<td><asp:textbox id="intro" textmode="multiline" cols="40" rows="4" runat="server"/><tr>
<td>网站评分</td><td><asp:dropdownlist id="grade" runat="server">
<asp:listitem>1</asp:listitem>
<asp:listitem>2</asp:listitem>
<asp:listitem selected="true">3</asp:listitem>
<asp:listitem>4</asp:listitem>
<asp:listitem>5</asp:listitem>
</asp:dropdownlist></td><tr>
<td><td><asp:button id="enter" onclick="enter_click" text="提交" runat="server"/>
</table>
<asp:label id="message" align="center" runat="server"/>
</form>
</body>
</html>