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

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.
 
G

Guest

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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top