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.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.
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="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_Conn ection=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/> "
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/> "
End If
Next
If CurrentRow.RowState = DataRowState.Unchanged 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.
Hi Biido,
Try declaring your Datable and Datarow before page_load
this 2 :-
Dim CurrentTable As DataTable
Dim CurrentRow As DataRow
GDLUCK
"bildo" wrote:
> 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="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_Conn ection=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/> "
> 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/> "
> End If
> Next
> If CurrentRow.RowState = DataRowState.Unchanged 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.
I tried the fix below - same blank browser screen result.
"Patrick.O.Ige" wrote:
> Hi Biido,
> Try declaring your Datable and Datarow before page_load
> this 2 :-
> Dim CurrentTable As DataTable
> Dim CurrentRow As DataRow
> GDLUCK
>
> "bildo" wrote:
> > 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="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_Conn ection=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/> "
> > 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/> "
> > End If
> > Next
> > If CurrentRow.RowState = DataRowState.Unchanged 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.
0 comments:
Post a Comment