Click here to Skip to main content
14,449,862 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi i want to give the database connection between the html and the Ms Acces database how to achieve this, please give me the solution for this.. i need urgently
Posted
Updated 4 days ago
Rate this:
Please Sign up or sign in to vote.

Solution 2

Please see my previous answer on similar topic

how to give database connection in HTML[^]
   
Rate this:
Please Sign up or sign in to vote.

Solution 3

<html>
<body>

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/webdata/northwind.mdb"

set rs=Server.CreateObject("ADODB.recordset")
sql="SELECT Companyname, Contactname FROM Customers
WHERE CompanyName LIKE 'A%'"
rs.Open sql, conn
%>

<table border="1" width="100%">
  <tr>
  <%for each x in rs.Fields
    response.write("<th>" & x.name & "</th>")
  next%>
  </tr>
  <%do until rs.EOF%>
    <tr>
    <%for each x in rs.Fields%>
      <td><%Response.Write(x.value)%></td>
    <%next
    rs.MoveNext%>
    </tr>
  <%loop
  rs.close
  conn.close%>
</table>

</body>
</html>
   
Comments
Richard Deeming 4 days ago
   
That's "classic" ASP, not HTML.

And it was a "dead" technology even when this question was posted. It's certainly not something anyone should be using today.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100