1. 论坛系统升级为Xenforo,欢迎大家测试!
    Dismiss Notice

大家帮我看下这个ASP代码

Discussion in '后端开发' started by 阿达, Dec 17, 2009.

  1. 阿达

    阿达 New Member

    Joined:
    Dec 6, 2005
    Messages:
    54
    Likes Received:
    0
    <%
    dim conn
    dim connstr
    dim db
    db="Database/guoda.mdb" '数据库文件位置
    on error resume next
    connstr="DBQ="+server.mappath(""&db&"")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
    set conn=server.createobject("ADODB.CONNECTION")
    dim rs_NewsZY,sql_NewsZY,i,Title,StrTemp
    set rs_NewsZY=server.createobject("adodb.recordset")
    sql_NewsZY="select top 10 * from wy_news order by id desc"
    rs_NewsZY.open sql_NewsZY,conn,1,1
    i=0
    Do While Not rs_NewsZY.EOF
    %>
    <% = rs_NewsZY("newsID") %>
    <% = rs_NewsZY("Title") %>
    test...
    <%
    rs_NewsZY.MoveNext
    i=i+1
    if i=10 then exit do
    Loop

    rs_NewsZY.close
    set rs_NewsZY=nothing
    %>
    请问哪里出错了,显示不了数据库的字段
     
  2. yanzikoua

    yanzikoua New Member

    Joined:
    May 21, 2010
    Messages:
    10
    Likes Received:
    0
    看不出什么东东。
     
  3. cangzhou1688

    cangzhou1688 New Member

    Joined:
    Jul 14, 2010
    Messages:
    84
    Likes Received:
    0
    我也看不懂
     
  4. fdebh

    fdebh New Member

    Joined:
    Jul 30, 2010
    Messages:
    34
    Likes Received:
    0
    期待答案。。。。
     
  5. nihao6681

    nihao6681 New Member

    Joined:
    Jul 24, 2010
    Messages:
    60
    Likes Received:
    0
    看不出来 请高手指教吧
     
  6. nihao6681

    nihao6681 New Member

    Joined:
    Jul 24, 2010
    Messages:
    60
    Likes Received:
    0
    这样很难看出来啊
     
  7. qhming

    qhming New Member

    Joined:
    Sep 19, 2009
    Messages:
    99
    Likes Received:
    0
    还真看不出来
     
  8. rzxrzx1314

    rzxrzx1314 New Member

    Joined:
    Sep 6, 2010
    Messages:
    30
    Likes Received:
    0
    想表达些什么?
     
  9. zlx1234

    zlx1234 New Member

    Joined:
    Sep 14, 2010
    Messages:
    280
    Likes Received:
    0
    我也不知道啊。