February 18, 2018

How To Sort The Data In ASP

freewaredownload.in free ASP SCRIPTS

FREE ASP SCRIPT SOURCE CODE

ASP SCRIPT SOURCE CODE FREE

ASP MS SQL DB CONNECTION STRING

[ad#BLOCKQUOTE-LINE]

Display the “Companyname” and “Contactname” fields from the “Customers” table, ordered by “Companyname”(Save as form.asp)


<body>

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

set rs = Server.CreateObject("ADODB.recordset")
sql="SELECT Companyname, Contactname FROM
Customers ORDER BY CompanyName"
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>


Developers Homepage Download Free now

FREE ASP CODE

Description:

SQL

Note: Copy the Source Code to Notepad or any other good Text Editor and save as .asp or .html or .css as the case may be. Give your own file name, if not described in the script.

SQL

RELATED FREEWARES

[catlist id=18]
[catlist id=5]

::