Sorry, this is a duplicate below. New at this.
The browser shows nothing at all. At first i was getting DBCOM errors and DB
cannot open because it may be opened by another user. Past those problems.
Thanks for looking at this.
Here is the code:
<%@ Import Namespace="Syst em.Data.SqlClie nt" %>
<%@ Import Namespace="Syst em.Data" %>
<%@ Page Language="vb" CodeBehind="Dis playDataSetItem s.aspx.vb"
AutoEventWireup ="false" Inherits="tstwe bapp.DisplayDat aSetItems" %>
<HTML>
<HEAD>
<script language="VB" runat="server">
Sub Page_Load
Dim myDS As New DataSet()
Dim ConnStr As String
ConnStr =
"server=DCXK7X5 1\sqlapps;datab ase=pubs;Truste d_Connection=ye s"
Dim SQLSelect As String
SQLSelect = "SELECT * FROM Titles "
SQLSelect &= "SELECT * FROM Publishers"
Dim mySqlConn As New SqlConnection(C onnStr)
Dim mySqlDA As New SqlDataAdapter( SQLSelect, ConnStr)
mySqlDA.Fill(my DS)
' Get Each DataTable in the DataTableCollec tion 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.Ta bleName & "<br/>"
value.Text &= "---------------------------------<br/>"
For Each CurrentRow In CurrentTable.Ro ws
value.Text &= "<br/> "
For Each CurrentColumn in CurrentTable.Co lumns
If Not (CurrentRow(Cur rentColumn) Is Nothing) Then
If Not IsDbNull(Curren tRow(CurrentCol umn)) Then
value.Text &= CStr(CurrentRow (CurrentColumn) )
Else
value.Text &= "NULL"
End If
value.Text &= "<br/> "
End If
Next
If CurrentRow.RowS tate = DataRowState.Un changed Then
value.Text &= "Unchanged< br/> "
End If
Next
value.Text &= "---------------------------------<br/>"
value.Text &= "<br/><br/>"
Next
End Sub
</script>
</HEAD>
<body>
<asp:literal id="value" runat="server" />
</body>
</HTML>
"Patrick.O. Ige" wrote:
HI Bildo..
Post the code u are pasting to VS.NET!
"bildo" wrote:
I just installed SQL 8.0, IIS, Visual Studio on XP Pro laptop. I installed
VS Books samples from book cd and ran SQL & Access DB samples on the browser
just fine.
Got the right results. I took the same code and created Visual Studio
project, making some changes until it was running and opening the browser
just fine - but my problem is I am not getting any DB table results - just a
blank browser. This happens for both SQL and Access only. All other apps
run just fine if no DB is involved. Please help with this problem. Do I
need to check on permissions on IE6 or VS.net??? I am new at this.