No DB table output on IE browser when App submitted from Visual St

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Just loaded my Laptop with XP Pro, SQL 8.0, and IIS server for the first
time. I installed student cd samples and they run fine on the browser for
SQL and Access databases when i just type the url 'hhtp://localhost/....".
PROBLEM: I copied the code and created a new project in Visual Studio and ran
my app - it finally runs on the browser with no errors but I do not get any
output for both access and SQL. Help please with restrictions on IIS or
Visual studio that is preventing any output from showing.
 
Thanks for looking at this so quick.
here is the code:
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Data" %>
<%@ Page Language="vb" CodeBehind="DisplayDataSetItems.aspx.vb"
AutoEventWireup="false" Inherits="tstwebapp.DisplayDataSetItems" %>
<HTML>
<HEAD>
<script language="VB" runat="server">
Sub Page_Load
Dim myDS As New DataSet()
Dim ConnStr As String
ConnStr =
"server=DCXK7X51\sqlapps;database=pubs;Trusted_Connection=yes"
Dim SQLSelect As String
SQLSelect = "SELECT * FROM Titles "
SQLSelect &= "SELECT * FROM Publishers"
Dim mySqlConn As New SqlConnection(ConnStr)
Dim mySqlDA As New SqlDataAdapter(SQLSelect, ConnStr)

mySqlDA.Fill(myDS)

' Get Each DataTable in the DataTableCollection and print each row
value.
Dim CurrentTable As DataTable
Dim CurrentRow As DataRow
Dim CurrentColumn As DataColumn
For Each CurrentTable In myDS.Tables
value.Text &= "Table: " & CurrentTable.TableName & "<br/>"
value.Text &= "---------------------------------<br/>"
For Each CurrentRow In CurrentTable.Rows
value.Text &= "<br/>&nbsp; "
For Each CurrentColumn in CurrentTable.Columns
If Not (CurrentRow(CurrentColumn) Is Nothing) Then
If Not IsDbNull(CurrentRow(CurrentColumn)) Then
value.Text &= CStr(CurrentRow(CurrentColumn))
Else
value.Text &= "NULL"
End If
value.Text &= "<br/>&nbsp; "
End If
Next
If CurrentRow.RowState = DataRowState.Unchanged Then
value.Text &= "Unchanged<br/>&nbsp; "
End If
Next
value.Text &= "---------------------------------<br/>"
value.Text &= "<br/><br/>"
Next
End Sub
</script>
</HEAD>
<body>
<asp:literal id="value" runat="server" />
</body>
</HTML>
 
Back
Top