home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 March
/
VPR9703A.ISO
/
MS_DEV
/
VID
/
SERVER
/
ASF
/
DATA.Z
/
ado5.asp
< prev
next >
Wrap
Text File
|
1996-10-07
|
570b
|
25 lines
<HTML>
<H1>ActiveX Data Objects</H1>
<H2>Simple Example Query using a fetch loop</H2>
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "ADOSamples"
sql="select ProductName, ProductDescription from Products where ProductType in ('Boot', 'Tent')"
Set RS = Conn.Execute(sql)
%>
Here are the results from the query:<BR><i><b> <%=sql%></i></b><P>
<TABLE BORDER>
<%while not RS.eof%>
<TR>
<TD><%=RS("ProductName")%></TD><TD><%=RS("ProductDescription")%></TD>
</TR>
<%
RS.MoveNext
wend
RS.close
Conn.close
%>
</TABLE>
</HTML>