| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2293 人关注过本帖
标题:asp连接access的问题
只看楼主 加入收藏
mzhn
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2016-12-27
收藏
 问题点数:0 回复次数:1 
asp连接access的问题

<%
   
    Dim conn

    Set conn=Server.CreateObject("ADODB.Connection")
    conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("ecnews.mdb")
   
   
   
   
    Dim rs,strSql
   
    %>

    <body>
        <div class="container tm-container">
            
            <div class="row navbar-row">
                <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12 navbar-container">
                    
                    <a href="javascript:void(0)" class="navbar-brand" id="go-to-top">Strip</a>
                    
                    <nav class="navbar navbar-full">
                        
                        <div class="collapse navbar-toggleable-md" id="tmNavbar">                           

                            <ul class="nav navbar-nav">
                                <li class="nav-item">
                                    <a class="nav-link" href="#tm-section-1">Home</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="#tm-section-2">Services</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="#tm-section-3">About</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="#tm-section-4">Contact</a>
                                </li>
                            </ul>

                        </div>

                    </nav>   
                    
                    <button class="navbar-toggler hidden-lg-up" type="button" data-toggle="collapse" data-target="#tmNavbar">
                        
                    </button>
                    
                </div>
            </div>
            
            
            <div class="tm-page-content">               
               
                <!-- #home -->
               
                <section id="tm-section-1" class="row tm-section">

                    <div class="tm-white-curve-left col-xs-12 col-sm-12 col-md-12 col-lg-7 col-xl-6">
                        <div class="tm-white-curve-left-rec"></div>
                        <div class="tm-white-curve-left-circle"></div>
                        <div class="tm-white-curve-text">
                        <%
                            strSql="Select * From  My music"                    
                            Set rs=conn.Execute(strSql)
                        %>
                          <h2 class="tm-section-header blue-text">Introduction</h2>
                            <p class="tm-section-header blue-text">&nbsp;</p>
                           
                            <%do while not rs.eof%>

                            <p>
                              <li><%=rs("musicname")%>;<%=rs("writer")%>;<%=rs("special")%><li>  
                            </p>
                            <%
                          rs.movenext
                               loop
                           %>     
                        </div>                        
                    </div>

                    <div class="tm-home-right col-xs-12 col-sm-12 col-md-12 col-lg-5 col-xl-6">
                    <%
                            strSql="Select * From My travel"                    
                            Set rs=conn.Execute(strSql)
                        %>
                        
                        <h2 class="tm-section-header">Our Mission</h2>
                        <%do while not rs.eof%>
                        <p class="thin-font">
                         <li><%=rs("site")%>;<%=rs("scenic spot")%>;<%=rs("tc")%><li>  
                        </p>
                        
                         <%
                          rs.movenext
                               loop
                           %>
                    </div>
                    
                </section> <!-- #home -->

                <!-- #services -->
                <section id="tm-section-2" class="row tm-section">
                    <div class="tm-flex-center col-xs-12 col-sm-6 col-md-6 col-lg-5 col-xl-6">
                        <img src="img/strip-01.jpg" alt="Image" class="img-fluid tm-img">
                    </div>

                    <div class="tm-white-curve-right col-xs-12 col-sm-6 col-md-6 col-lg-7 col-xl-6">
                        
                        <div class="tm-white-curve-right-circle"></div>
                        <div class="tm-white-curve-right-rec"></div>
                        
                        <div class="tm-white-curve-text">
                        <%
                            strSql="Select * From  My news"                    
                            Set rs=conn.Execute(strSql)
                            %>
                           
                            <h2 class="tm-section-header red-text">Our Services</h2>
                           <%do while not rs.eof%>
                            <p>
                            <li><%=rs("mname")%>;<%=rs("addtime")%><li>
                            </p>
                            <%
                               rs.movenext
                               loop
                            %>     
                        </div>
                        
                    </div>
                </section> <!-- #services -->

                <!-- #about -->
                <section id="tm-section-3" class="row tm-section">
                    <div class="tm-white-curve-left col-xs-12 col-sm-6 col-md-6 col-lg-7 col-xl-6">
                        <div class="tm-white-curve-left-rec">
                           
                        </div>
                        <div class="tm-white-curve-left-circle">
                           
                        </div>
                        <div class="tm-white-curve-text">
                        <%
                            strSql="Select * From  My sports"                    
                            Set rs=conn.Execute(strSql)
                            %>
                            <h2 class="tm-section-header gray-text">About our company</h2>
                             <%do while not rs.eof%>
                            <p class="thin-font">
                            <li><%=rs("sname")%>;<%=rs("source")%>;<%=rs("time")%><li>
                            </p>
                           
                             <%
                               rs.movenext
                               loop
                            %>   
                        </div>
                        
 代码有问题吗,我的网页显示不出来
搜索更多相关主题的帖子: access 
2016-12-27 20:30
cnjc
Rank: 2
等 级:论坛游民
帖 子:15
专家分:14
注 册:2007-8-17
收藏
得分:0 
提示什么错误
只发这些代码根本不好判断
2017-03-12 18:22
快速回复:asp连接access的问题
数据加载中...
 
   



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

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