Display data From database into 2 Column

<%
Conn_String = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("link.mdb")
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.Open Conn_String
sql = "select * from cat order by ID"
set rs = Conn.Execute (sql)
'Connect to database
%>

<table border="0" width="300">

<%
Do while NOT rs.EOF
ColNum = 1
 Do while ColNum < 3
%>

<!-- First column-->
<TD ALIGN=LEFT VALIGN=middle WIDTH="150"><a href="showlink.asp?CatID=<%=rs("id")%>"><%=rs("cat")%>
</a></TD>

<%
if NOT rs.EOF then
rs.MoveNext
end if
ColNum = ColNum + 1
if NOT rs.EOF then
%>

<!-- second column-->
<TD ALIGN=LEFT VALIGN=middle WIDTH="150"><a href="showlink.asp?CatID=<%=rs("id")%>"><%=rs("cat")%></a></TD>

<%
end if
ColNum = ColNum + 1
Loop
%>

</TR>

<%
if NOT rs.EOF then  
rs.MoveNext  
end if
Loop
%>

</TABLE>

<% rs.close
Conn.Close
set Conn = nothing
%>

时间: 2024-09-15 20:39:06

Display data From database into 2 Column的相关文章

Javascript miscellanea -display data real time, using window.status_典型特效

<script type="text/javascript">  //<![CDATA[  function fstatus() {  for (var i=0; i<100000; i++) {  window.status = "now process is \"" +i+ "\"";  }  }  function finnerHtml() {  for (var i=0; i<1000; 

Display Database Image using MS SQL Server 2008 Reporting Services

原文 Display Database Image using MS SQL Server 2008 Reporting Services With the new release of MS SQL Server 2008 Reporting Services has introduced a new feature that will help report developers (Business Intelligence BI professionals) to display imag

HOW TO: Update a Database from a DataSet Object Us

HOW TO: Update a Database from a DataSet Object Using Visual Basic .NETThis article discusses a Beta release of a Microsoft product. The information in this article is provided as-is and is subject to change without notice. No formal product support

HOW TO: Update a Database from a DataSet Object Using Visual Basic .NET

object|visual HOW TO: Update a Database from a DataSet Object Using Visual Basic .NETThis article discusses a Beta release of a Microsoft product. The information in this article is provided as-is and is subject to change without notice. No formal pr

呵呵。需要的人一定很多。Creating a SQL Server Database Programmatically

server SQL provides statements to create new databases and database objects. You can execute these statements from your program to create databases programmatically. In this article, I抣l show you how to create a new SQL Server database and its object

Introduction to Change Data Capture (CDC) in SQL Server 2008[转]

Change Data Capture records INSERTs, UPDATEs, and DELETEs applied to SQL Server tables, and makes a record available of what changed, where, and when, in simple relational 'change tables' rather than in an esoteric chopped salad of XML. These change

The Log: What every software engineer should know about real-time data&#039;s unifying abstraction

主要的思想,  将所有的系统都可以看作两部分,真正的数据log系统和各种各样的query engine  所有的一致性由log系统来保证,其他各种query engine不需要考虑一致性,安全性,只需要不停的从log系统来同步数据,如果数据丢失或crash可以从log系统replay来恢复  可以看出kafka系统在linkedin中的重要地位,不光是data aggregation,而是整个系统的核心 Part One: What Is a Log? log定义 很简单的结构,最关键的属性是,

1 Oracle Database 11g Release 2 (11.2.0.4) New Features

1 Oracle Database 11g Release 2 (11.2.0.4) New Features This chapter contains descriptions of all of the features that are new to Oracle Database 11g Release 2 (11.2.0.4). 1.1 Oracle Data Redaction This new database security feature is part of Oracle

如何创建一个成功的数据仓库(data warehouse) (想了解数据仓库的人士快看)

创建|数据        如何创建一个成功的数据仓库(data warehose),下面的故事将告诉你!       The company's first data warehouse project began with a casual conversation between several executives on their way to lunch. The people involved were the IT manager for decision support as w