| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 634 人关注过本帖
标题:[求助]ODBC 驱动程序不支持所需的属性
只看楼主 加入收藏
huifeidezhu
Rank: 1
等 级:新手上路
帖 子:88
专家分:0
注 册:2005-11-29
收藏
 问题点数:0 回复次数:1 
[求助]ODBC 驱动程序不支持所需的属性
程序:
<%
dim conn,mdbfile
mdbfile=server.mappath("../../../khfk/khfk.mdb")
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&mdbfile
%>
<%Dim GbId
GbId = request.QueryString("Id")
set rsu=server.createobject("adodb.recordset")
sql="select Id,Title from GuestBook where id="&GbId
rsu.open sql,conn,1,1
%>
<link rel="stylesheet" type="text/css" href="../style.css">
<STYLE type=text/css>
<!--
td { font-family: "宋体"; font-size: 9pt; line-height: 14pt; }
-->
</STYLE>
<p> </p>
<div align="center">
<center>
<table width="80%" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td height="20" bgcolor="#E8F4FF" width="80%">
<div align="center"><strong>
<font color="#FF0000" style="font-size: 10.5pt">回 复 留 言</font></strong></div></td>
</tr>
<tr>
<Form language=javascript name="Gbhf" method="POST" action="hfbook.asp?add" onsubmit="return Gbhf_onsubmit()">
<td height="56" valign="top" width="80%">
<div align="center">
<center>
<table width="100%" border="1" cellspacing="1" bgcolor="F4F4F4" bordercolorlight="#E8F4FF" bordercolordark="#E8F4FF" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td height="30" align="right" width="128" bgcolor="#FBFDFF">主题:</td>
<td height="30" width="524" bgcolor="#FBFDFF"><font color="#FF0000"><%=rsu("Title")%></font>
<input type="hidden" name="G_id" value="<%=rsu("Id")%>"></td>
</tr>
<tr>
<td width="128" height="30" align="right" bgcolor="#FBFDFF">姓名:</td>
<td width="524" height="30" bgcolor="#FBFDFF">
<% IF not(Session("KEY")="1" or session("KEY")="2") THEN %>
<input name="G_Name" type="text" maxlength="20" size="20">
<font color="#FF0000">*</font> 请写上您的姓名。
<%else%>
<input name="G_Name" type="text" maxlength="20" value="<%=Session("UserName")%>" size="20">
<%end if%>
</td>
</tr>
<tr>
<td width="128" height="30" align="right" bgcolor="#FBFDFF">邮件:</td>
<td height="30" width="524" bgcolor="#FBFDFF">
<input name="G_Email" type="text" id="G_Email" size="29" maxlength="50">
(请填上您的Email地址。) </td>
</tr>
<tr>
<td width="128" align="right" bgcolor="#FBFDFF">内容:</td>
<td width="524" bgcolor="#FBFDFF">
<textarea name="G_Content" cols="55" rows="8" id="G_Content"></textarea>
<font color="#FF0000">*</font></td>
</tr>
<tr align="center">
<td height="30" colspan="2" width="653" bgcolor="#FBFDFF"> <input type="submit" name="Submit" value="回 复">
<input type="button" value="返 回" class="smallInput" onclick=javascript:history.go(-1)>
</td>
</tr>
</table></center>
</div>
</td>
</Form>
</tr>
<tr>
<td height="20" valign="top" bgcolor="#E8F4FF" width="80%"> </td>
</tr>
</table>
</center>
</div>
<SCRIPT language=javascript id=QzeNet>
<!--
function Gbhf_onsubmit()
{
if(document.Gbhf.G_Name.value.length<1)
{
alert("您必须输入您的姓名!");
document.Gbhf.G_Name.focus();
return false;
}
if(document.Gbhf.G_Content.value.length<1)
{
alert("您必须输入您的留言内容!");
document.Gbhf.G_Content.focus();
return false;
}
if(document.Gbhf.G_Content.value.length>300)
{
alert("您输入留言内容超过300字!");
document.Gbhf.G_Content.focus();
return false;
}
}
//-->
</SCRIPT>
<% Dim Gid,Gname,Gemail,Gcontent
GId = request.form("G_Id")
Gname = Trim(request.form("G_Name"))
Gemail = Trim(request.form("G_Email"))
Gcontent = request.form("G_Content")
'HTML支持
function htmlencode(str)
htmlencode=server.htmlencode(str)
htmlencode=replace(replace(htmlencode,chr(13),"<br>"),"'","’")
end function
set rs=server.createobject("adodb.recordset")
sqltext="select * from hfbook"
rs.open sqltext,conn,3,3
if request.querystring="add" then
'添加一条留言到数据库
rs.addnew
rs("GId")=GId
rs("GName")=Gname
if Gemail="" then
rs("GEmail")="@"
else
rs("GEmail")=Gemail
end if
rs("GContent")=htmlencode(Gcontent)
if Session("GbAdmin")="" then
rs("IsA")=false
else
rs("IsA")=True
end if
rs("GTime")=cstr(now())
rs.update
rs.close
conn.close
Response.Redirect "khbook.asp"
End if
%>
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
ODBC 驱动程序不支持所需的属性。
/chanye/admin/user/hfbook.asp, 第 19 行
请问各位:这是什么原因阿??
搜索更多相关主题的帖子: ODBC 属性 rsu 
2005-12-15 10:03
huifeidezhu
Rank: 1
等 级:新手上路
帖 子:88
专家分:0
注 册:2005-11-29
收藏
得分:0 
求大家给看一下阿,我很菜的,帮帮忙啊!!!
程序:
<%
dim conn,mdbfile
mdbfile=server.mappath("../../../khfk/khfk.mdb")
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&mdbfile
%>
<%Dim GbId
GbId = request.QueryString("Id")
set rsu=server.createobject("adodb.recordset")
sql="select Id,Title from GuestBook where id="&GbId
rsu.open sql,conn,1,1
%>
<link rel="stylesheet" type="text/css" href="../style.css">
<STYLE type=text/css>
<!--
td { font-family: "宋体"; font-size: 9pt; line-height: 14pt; }
-->
</STYLE>
<p> </p>
<div align="center">
<center>
<table width="80%" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td height="20" bgcolor="#E8F4FF" width="80%">
<div align="center"><strong>
<font color="#FF0000" style="font-size: 10.5pt">回 复 留 言</font></strong></div></td>
</tr>
<tr>
<Form language=javascript name="Gbhf" method="POST" action="hfbook.asp?add" onsubmit="return Gbhf_onsubmit()">
<td height="56" valign="top" width="80%">
<div align="center">
<center>
<table width="100%" border="1" cellspacing="1" bgcolor="F4F4F4" bordercolorlight="#E8F4FF" bordercolordark="#E8F4FF" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td height="30" align="right" width="128" bgcolor="#FBFDFF">主题:</td>
<td height="30" width="524" bgcolor="#FBFDFF"><font color="#FF0000"><%=rsu("Title")%></font>
<input type="hidden" name="G_id" value="<%=rsu("Id")%>"></td>
</tr>
<tr>
<td width="128" height="30" align="right" bgcolor="#FBFDFF">姓名:</td>
<td width="524" height="30" bgcolor="#FBFDFF">
<% IF not(Session("KEY")="1" or session("KEY")="2") THEN %>
<input name="G_Name" type="text" maxlength="20" size="20">
<font color="#FF0000">*</font> 请写上您的姓名。
<%else%>
<input name="G_Name" type="text" maxlength="20" value="<%=Session("UserName")%>" size="20">
<%end if%>
</td>
</tr>
<tr>
<td width="128" height="30" align="right" bgcolor="#FBFDFF">邮件:</td>
<td height="30" width="524" bgcolor="#FBFDFF">
<input name="G_Email" type="text" id="G_Email" size="29" maxlength="50">
(请填上您的Email地址。) </td>
</tr>
<tr>
<td width="128" align="right" bgcolor="#FBFDFF">内容:</td>
<td width="524" bgcolor="#FBFDFF">
<textarea name="G_Content" cols="55" rows="8" id="G_Content"></textarea>
<font color="#FF0000">*</font></td>
</tr>
<tr align="center">
<td height="30" colspan="2" width="653" bgcolor="#FBFDFF"> <input type="submit" name="Submit" value="回 复">
<input type="button" value="返 回" class="smallInput" onclick=javascript:history.go(-1)>
</td>
</tr>
</table></center>
</div>
</td>
</Form>
</tr>
<tr>
<td height="20" valign="top" bgcolor="#E8F4FF" width="80%"> </td>
</tr>
</table>
</center>
</div>
<SCRIPT language=javascript id=QzeNet>
<!--
function Gbhf_onsubmit()
{
if(document.Gbhf.G_Name.value.length<1)
{
alert("您必须输入您的姓名!");
document.Gbhf.G_Name.focus();
return false;
}
if(document.Gbhf.G_Content.value.length<1)
{
alert("您必须输入您的留言内容!");
document.Gbhf.G_Content.focus();
return false;
}
if(document.Gbhf.G_Content.value.length>300)
{
alert("您输入留言内容超过300字!");
document.Gbhf.G_Content.focus();
return false;
}
}
//-->
</SCRIPT>
<% Dim Gid,Gname,Gemail,Gcontent
GId = request.form("G_Id")
Gname = Trim(request.form("G_Name"))
Gemail = Trim(request.form("G_Email"))
Gcontent = request.form("G_Content")
'HTML支持
function htmlencode(str)
htmlencode=server.htmlencode(str)
htmlencode=replace(replace(htmlencode,chr(13),"<br>"),"'","’")
end function
set rs=server.createobject("adodb.recordset")
sqltext="select * from hfbook"
rs.open sqltext,conn,3,3
if request.querystring="add" then
'添加一条留言到数据库
rs.addnew
rs("GId")=GId
rs("GName")=Gname
if Gemail="" then
rs("GEmail")="@"
else
rs("GEmail")=Gemail
end if
rs("GContent")=htmlencode(Gcontent)
if Session("GbAdmin")="" then
rs("IsA")=false
else
rs("IsA")=True
end if
rs("GTime")=cstr(now())
rs.update
rs.close
conn.close
Response.Redirect "khbook.asp"
End if
%>
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
ODBC 驱动程序不支持所需的属性。
/chanye/admin/user/hfbook.asp, 第 19 行
请问各位:这是什么原因阿??

希望能和大家学到很多东西!!
2005-12-15 10:15
快速回复:[求助]ODBC 驱动程序不支持所需的属性
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.032510 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved