Northwind 2007.accdb
    3.77MB

    <html>
    
    <body bgcolor="#FFFFFF">
    
    <p><big><big>Categories</big></big> </p>
    
    <hr size="1" align="left">
    <% 
    Dim accessDB
    Dim conn
    Dim rst
    Dim sql
    
    
    accessDB = "Northwind 2007.accdb"
    
    conn = "Provider=Microsoft.ACE.OLEDB.12.0;" & _
       "Data Source=" & Server.MapPath(accessDB) & _
      "; Persist Security Info = False;"
    
    Set rst = Server.CreateObject("ADODB.Recordset")
    
    sql = "Select ID, Company, City From Employees"
    
    rst.Open sql, conn
    
    %>
    
    <table border="1" width="670">
        <tr bgcolor="gray">
            <td width="155" height="11">
                <p><b>Category ID</b></p>
            </td>
            <td width="159" height="11">
                <p><b>Category Name</b></p>
            </td>
            <td width="334" height="11">
                <p><b>Description</b></p>
            </td>
        </tr>
    
    <%
    While Not rst.eof
    %>
    
        <tr>
            <td width="155" height="3">
                <p><%=rst("ID")%></p>
            </td>
            <td width="159" height="3">
                <p><%=rst("Company")%></p>
            </td>
            <td width="334" height="3">
                <p><%=rst("City")%></p>
            </td>
        </tr>
    
    <% 
    rst.movenext
    Wend
    
    rst.close
    set rst=nothing
    conn.close
    Set conn=nothing
    %>
    
    </table>
    
    </body>
    </html>
    • 네이버 블러그 공유하기
    • 네이버 밴드에 공유하기
    • 페이스북 공유하기
    • 카카오스토리 공유하기
    loading