首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

帮忙看个异常 ODBC 驱动程序不支持所需的属性 多谢 急等

2012-02-21 
帮忙看个错误 ODBC 驱动程序不支持所需的属性 谢谢 急等!错误类型:MicrosoftOLEDBProviderforODBCDrivers(

帮忙看个错误 ODBC 驱动程序不支持所需的属性 谢谢 急等!
错误类型:Microsoft   OLE   DB   Provider   for   ODBC   Drivers   (0x80040E21)   ODBC   驱动程序不支持所需的属性

错误行
/main.asp,   第   12   行

  rs.open   sql,conn,1,1————————这行


<!--#include   file= "conn.asp "   -->
<%if   session( "dname ")= " "   then
'--------
response.write   " <script   language=javascript> alert( '由于长时间没有活动或没有登陆,请重新登陆! ') </script> "
  response.write   " <script   language=javascript> window.open( 'index.asp ', '_parent ') </script> "
  response.end
'--------
end   if
riqi=date()
  set   rs=server.createobject( "adodb.recordset ")  
  sql= "select   *   from   rizhi   where   name= ' "&session( "dname ")& " '   and   riqi= ' "&riqi& " ' "
---------------------------------------------
---------------------------------------------
---------------------------------------------  
---------------------------------------------
  rs.open   sql,conn,1,1————————这行
-----------------------------------------------
---------------------------------------------
---------------------------------------------
if   not   rs.eof   then
  response.write   " <script   language=javascript> alert( '你今天已填写了日志! ') </script> "
  Response.Redirect   "edit.asp?riqi= "&riqi
  end   if
rs.close
set   rs=nothing
work=Request( "work ")
IF   work= "yes "   Then
  set   rs=server.createobject( "adodb.recordset ")  
  sql= "select   *   from   rizhi "  
  rs.open   sql,conn,3,3
  rs.addnew
    rs( "riqi ")           =Request( "riqi ")
    rs( "czwt ")                 =Request( "czwt ")
    rs( "gx ")               =Request( "gx ")    
    rs( "chx ")               =Request( "chx ")
    rs( "time ")               =Request( "time ")
    rs( "gh ")               =Request( "gh ")
    rs( "ghhm1 ")               =Request( "ghhm1 ")
    rs( "ghhm2 ")               =Request( "ghhm2 ")
    rs( "ghhm3 ")               =Request( "ghhm3 ")
    rs( "ghhm4 ")               =Request( "ghhm4 ")
    rs( "ghhm5 ")               =Request( "ghhm5 ")    
    rs( "xlt ")               =Request( "xlt ")    
    rs( "xlthm1 ")               =Request( "xlthm1 ")
    rs( "xlthm2 ")               =Request( "xlthm2 ")    


    rs( "xlthm3 ")               =Request( "xlthm3 ")
    rs( "xlthm4 ")               =Request( "xlthm4 ")
    rs( "xlthm5 ")               =Request( "xlthm5 ")
    rs( "th ")               =Request( "th ")
    rs( "thhm1 ")               =Request( "thhm1 ")
    rs( "thhm2 ")               =Request( "thhm2 ")
    rs( "thhm3 ")               =Request( "thhm3 ")
    rs( "thhm4 ")               =Request( "thhm4 ")    
    rs( "thhm5 ")               =Request( "thhm5 ")    
    rs( "kd ")               =Request( "kd ")
    rs( "kdhm1 ")               =Request( "kdhm1 ")    
    rs( "kdhm2 ")               =Request( "kdhm2 ")
    rs( "kdhm3 ")               =Request( "kdhm3 ")
    rs( "kdhm4 ")               =Request( "kdhm4 ")
    rs( "kdhm5 ")               =Request( "kdhm5 ")
    rs( "qq ")               =Request( "qq ")
    rs( "qqhm1 ")               =Request( "qqhm1 ")
    rs( "qqhm2 ")               =Request( "qqhm2 ")
    rs( "qqhm3 ")               =Request( "qqhm3 ")    
    rs( "qqhm4 ")               =Request( "qqhm4 ")
    rs( "qqhm5 ")               =Request( "qqhm5 ")
    rs( "jjl ")               =Request( "jjl ")
    rs( "jjlhm1 ")               =Request( "jjlhm1 ")
    rs( "jjlhm2 ")               =Request( "jjlhm2 ")
    rs( "jjlhm3 ")               =Request( "jjlhm3 ")
    rs( "jjlhm4 ")               =Request( "jjlhm4 ")
    rs( "jjlhm5 ")               =Request( "jjlhm5 ")    
    rs( "yl ")               =Request( "yl ")
    rs( "ylhm1 ")               =Request( "ylhm1 ")
    rs( "ylhm2 ")               =Request( "ylhm2 ")
    rs( "ylhm3 ")               =Request( "ylhm3 ")


    rs( "ylhm4 ")               =Request( "ylhm4 ")
    rs( "ylhm5 ")               =Request( "ylhm5 ")
    rs( "lx ")               =Request( "lx ")
    rs( "lxhm1 ")               =Request( "lxhm1 ")    
    rs( "lxhm2 ")               =Request( "lxhm2 ")
    rs( "lxhm3 ")               =Request( "lxhm3 ")
    rs( "lxhm4 ")               =Request( "lxhm4 ")
    rs( "lxhm5 ")               =Request( "lxhm5 ")
    rs( "hb ")               =Request( "hb ")
    rs( "hbhm1 ")               =Request( "hbhm1 ")
    rs( "hbhm2 ")               =Request( "hbhm2 ")
    rs( "hbhm3 ")               =Request( "hbhm3 ")    
    rs( "hbhm4 ")               =Request( "hbhm4 ")
    rs( "hbhm5 ")               =Request( "hbhm5 ")
    rs( "xxh ")               =Request( "xxh ")
    rs( "zf1 ")               =Request( "zf1 ")
    rs( "zf2 ")               =Request( "zf2 ")
    rs( "zf3 ")               =Request( "zf3 ")
    rs( "zf4 ")               =Request( "zf4 ")
    rs( "zf5 ")               =Request( "zf5 ")    
 
    For   i   =   1   To   Request.Form( "renwu ").Count
sContent   =   sContent   &   Request.Form( "renwu ")(i)
 
 
Next
FL_bz=sContent
    rs( "renwu ")               =FL_bz
  rs.update   '更新数据表记录
  Response.Write   " <SCRIPT   LANGUAGE= 'JavaScript '> "
  Response.Write   "alert( '日志已成功提交! '); "
  Response.Write   "window.location= 'manage.asp ' "
  Response.Write   " </SCRIPT> "
End   IF
%>
<script   language= "JavaScript ">
function   keyHandle()   {
    if   (event.keyCode <33||event.keyCode> 126)   {
    alert( "请不要输入空格和全角字符@_@ ");
        event.returnValue   =   false;
    }
}
        </script>
            <script   LANGUAGE= "JavaScript ">
function   check()
{

    if   (document.Form1.dname.value== " ")


          {
            alert( "你那位?贵姓! ")
            document.Form1.chx.focus()
            document.Form1.chx.select()
            return
          }
      if   (document.Form1.czwt.value== " ")
          {
            alert( "存在问题未填写! ")
            document.Form1.czwt.focus()
            document.Form1.czwt.select()
            return
    }
          document.Form1.submit()
}
                                                                        </SCRIPT>
<html>
<head>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312 ">
<title> ∷   兰山网通——工作日志   ∷ </title>
<link   href= "css/css.css "   rel= "stylesheet "   type= "text/css ">
<style   type= "text/css ">
<!--
body   {
background-image:   url(images/Inbg.gif);
}
.style7   {color:   #CCCCCC}
-->
</style>
</head>

<body>
<!--#include   file= "top.asp "--> <table   width= "884 "     border= "0 "   align= "center "   cellpadding= "0 "   cellspacing= "0 ">
    <tr>
        <td   width= "1009 "   valign= "top "   background= "images/log_04.jpg "> <table   width= "90% "     border= "0 "   align= "center "   cellpadding= "0 "   cellspacing= "10 ">
            <tr>
                <td> <form   name= "Form1 "   method= "post "   action= " ">
                    <table   width= "100% "     border= "0 "   cellspacing= "0 "   cellpadding= "4 ">
                        <tr>
                            <td   width= "13% ">   <div   align= "right "> 日&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;期   :   </div> </td>
                            <td   width= "87% "> <input   name= "riqi "   type= "text "   id= "riqi "   value= " <%=riqi%> "   size= "50 "   readonly>
是否共享该日志:是
    <input   name= "gx "   type= "radio "   value= "是 "   checked>

<input     name= "gx "   type= "radio "   value= "否 "> </td>


                        </tr>
                        <tr>
                            <td   colspan= "2 "> <table   width= "100% "     border= "0 "   cellspacing= "0 "   cellpadding= "0 ">
                                <tr>
                                    <td   height= "1 "   bgcolor= "#D3DD9B "> </td>
                                </tr>
                            </table> </td>
                            </tr>
                        <tr>
                            <td>
                                <div   align= "right "> 预计完成日期:   </div> </td>
                            <td> <input   name= "time "   type= "text "   id= "time "   value= " <%=now()%> "size= "50 "   readonly> </td>
                        </tr>
                        <tr>
                            <td   colspan= "2 "> <table   width= "100% "     border= "0 "   cellspacing= "0 "   cellpadding= "0 ">
                                <tr>
                                    <td   height= "1 "   bgcolor= "#D3DD9B "> </td>
                                </tr>
                            </table> </td>
                            </tr>


[解决办法]
数据库连接字符串更改一下试试:

用这种方式
ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & Server.MapPath(db)

不要用这种
connstr= "driver={Microsoft Access Driver (*.mdb)};dbq= " & Server.MapPath(db)

热点排行