VS app does not show SQL or Access DB result in IE browser.

Discussion in 'ASP .Net' started by =?Utf-8?B?YmlsZG8=?=, Nov 12, 2004.

  1. 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.
    =?Utf-8?B?YmlsZG8=?=, Nov 12, 2004
    #1
    1. Advertising

  2. 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.
    =?Utf-8?B?UGF0cmljay5PLklnZQ==?=, Nov 12, 2004
    #2
    1. Advertising

  3. 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_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>


    "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.
    =?Utf-8?B?YmlsZG8=?=, Nov 12, 2004
    #3
  4. 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_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/> "
    > 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.
    =?Utf-8?B?UGF0cmljay5PLklnZQ==?=, Nov 12, 2004
    #4
  5. 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_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/> "
    > > 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.
    =?Utf-8?B?YmlsZG8=?=, Nov 13, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Christophe Niel
    Replies:
    0
    Views:
    385
    Christophe Niel
    Jan 13, 2004
  2. J.Ram
    Replies:
    7
    Views:
    637
  3. Hacken
    Replies:
    7
    Views:
    300
    Hacken
    Oct 10, 2009
  4. Michael Tan
    Replies:
    32
    Views:
    910
    Ara.T.Howard
    Jul 21, 2005
  5. greenflame
    Replies:
    6
    Views:
    139
    greenflame
    Jun 18, 2005
Loading...

Share This Page