主题:  各位大虾,帮帮小弟看看我这个程序错在哪儿?

shinley

职务:普通成员
等级:1
金币:0.0
发贴:24
#12003/2/17 21:06:07
请大家帮我看看这个程序的问题,谢谢!



<% @language=vbscript %>
<%

dim rowcount
rowcount=0
dim liucount
liucount=0
dim textcount
textcount=0

set rs1=Server.CreateObject("ADODB.Recordset")

str="Driver={Microsoft Access Driver (*.mdb)}; DBQ="&Server.MapPath("\xyl")&"\datebase\xiaoyou.mdb;"+_
"DriverId=25;FIL=MS Access;ImplicitCommitSync=Yes;"+_
"MaxBufferSize=512;MaxScanRows=8;PageTimeout=5;"+_
"SafeTransactions=0;Threads=5;UserCommitSync=Yes;"
set conn=Server.CreateObject("ADODB.Connection")
conn.Open str



if request("REQUEST_METHOD")="POST" then
rs1.Activeconnection=conn
xr_nameid=trim(request("namid"))
x_pw=trim(request("pw"))
sqlstr="select nameid,pw from regist where nameid='"&xr_nameid&"' and pw='"&x_pw&"'"
     rs1.open sqlstr,conn,1,1
if not rs1.EOF then
session("www_accept")="true"
session("www_nameid")=xr_nameid
rs1.Close
rs1.ActiveConnection=nothing
else
session("www_accept")=""
Response.Redirect error.htm
rs1.Close
rs1.ActiveConnection=nothing
end if

else


end if

%>






I love 孙中































欢迎你,<%=session("www_nameid") %>  今天是<%=year(Date)%> 年<%=month(Date)%> 月<%=day(Date)%> 日















    <%
    set rs3=Server.CreateObject("ADODB.Recordset")
    sqlstr3="select * from liuyan"
    rs3.Open sqlstr3,conn,1,1

    while not rs3.eof and liucount<8
    xl_nameid=rs3("nameid")
    xl_liuyan=rs3("liuyan")
    xl_ldate=rs3("ldate")
    %>
  • <% Response.write(xl_nameid)%>

    <%=xl_liuyan%> ......<%=xl_ldate%>
    <% rs3.movenext
    liucount=liucount+1
    wend
    rs3.Close
    rs3.ActiveConnection=nothing
    %>



更多...




























<%
set rs2=Server.CreateObject("ADODB.Recordset")
rs2.Activeconnection=conn
sqlstr2="select * from text"
rs2.Open sqlstr2,conn,1,1

while not rs2.EOF and textcount<3
xt_nameid=rs2("nameid")
xt_title=rs2("title")
xt_context=Left(rs2("context"),15)
xt_tdate=rs2("tdate")
%>




<%
rs2.MoveNext
textcount=textcount+1
wend
rs2.Close
rs2.ActiveConnection=nothing
%>




<%=xt_title%> ——<%=xt_nameid%>

更多...





 









错误为:


[color=Green]Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e21' [color=Red]

编辑历史:[这消息被shinley编辑过(编辑时间2003-02-17 21:09:07)]
[这消息被shinley编辑过(编辑时间2003-02-19 19:18:59)]


shinley

职务:普通成员
等级:1
金币:0.0
发贴:24
#22003/2/17 21:32:43
不好意思,多了点,而且编辑得有点乱,麻烦大家了



namelysweet

职务:普通成员
等级:3
金币:1.0
发贴:681
#32003/2/22 22:38:05
把错误提示贴出来先!


::和讯网 www.homeway.com.cn ::


makdh

职务:普通成员
等级:1
金币:0.0
发贴:28
#42003/2/25 13:24:57
Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e21'