home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 March
/
VPR9703A.ISO
/
MS_DEV
/
VID
/
SERVER
/
ASF
/
DATA.Z
/
script6.asp
< prev
next >
Wrap
Text File
|
1996-10-22
|
1KB
|
35 lines
<form method="Post" Action="atumd2.asp#UsingtheDatabaseAccessComponent">
<input type="hidden" name="Script6" value="True"><p align="center"><input type="Submit" Value="Show Me"></p>
</form>
<% If Request.Form("Script6") = "True" then%>
<%
Set dbConnection = Server.CreateObject("ADODB.Connection")
dbConnection.Open "AdvWorks"
SQLQuery = "SELECT * FROM Customers"
Set rsCustomerList = dbConnection.Execute(SQLQuery)
%>
<Center>
<TABLE BORDER=1>
<% Do While Not rsCustomerList.EOF %>
<TR>
<TD><% = rsCustomerList("CompanyName") %></TD>
<TD><% = rsCustomerList("ContactLastName") & ", " & rsCustomerList("ContactFirstName") %>
</TD>
<TD><% = rsCustomerList("ContactLastName") %></TD>
<TD><% = rsCustomerList("City") %></TD>
<TD><% = rsCustomerList("StateOrProvince") %></TD>
</TR>
<% rsCustomerList.MoveNext
Loop %>
</TABLE>
</Center>
<% Else %>
<Center>
<TABLE BORDER=1>
<TR><TD width=199> </TD><TD width=105> </TD><TD width=52> </TD><TD width=110> </TD><TD width=27><BR></TD></TR>
<TR><TD width=199> </TD><TD width=105> </TD><TD width=52> </TD><TD width=110> </TD><TD width=27><BR></TD></TR>
<TR><TD width=199> </TD><TD width=105> </TD><TD width=52> </TD><TD width=110> </TD><TD width=27><BR></TD></TR>
</Table>
</Center>
<%End if%>