Advertisement
Advertisement
| 06.15.2008 at 08:47PM PDT, ID: 23487048 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: |
<%@ Page aspcompat=true Language="VB" AutoEventWireup="false" CodeFile="read_db.aspx.vb" Inherits="read_db" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
Results of a Simple Database Query
<% Dim Connect, ResultSet, Query%>
<% 'Now, create a server object which will be a DNS connection %>
<% Connect = Server.CreateObject("ADODB.Connection")%>
<% 'Open the connection to the right DSN %>
<% Connect.Open("bellevue_db")
Query = "SELECT * FROM student626"
ResultSet = Connect.Execute(Query)
%>
<table width='80%'>
<% Do Until ResultSet.EOF %>
<tr align='center'>
<% For i = 0 To ResultSet.Fields.Count - 1 %>
<td>
<%=ResultSet.Fields(i)%>
</td>
<% Next %>
</tr>
<%
ResultSet.MoveNext
Loop
%>
</table>
</body>
</body>
</html>
|