Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > VS app does not show SQL or Access DB result in IE browser.

Reply
Thread Tools

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

 
 
=?Utf-8?B?YmlsZG8=?=
Guest
Posts: n/a
 
      11-12-2004
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.
 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGF0cmljay5PLklnZQ==?=
Guest
Posts: n/a
 
      11-12-2004
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.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?YmlsZG8=?=
Guest
Posts: n/a
 
      11-12-2004
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_Con nection=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.

 
Reply With Quote
 
=?Utf-8?B?UGF0cmljay5PLklnZQ==?=
Guest
Posts: n/a
 
      11-12-2004
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_Con nection=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.

 
Reply With Quote
 
=?Utf-8?B?YmlsZG8=?=
Guest
Posts: n/a
 
      11-13-2004
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_Con nection=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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
simulation result is correct but synthesis result is not correct J.Ram VHDL 7 12-03-2008 01:26 PM
1. Ruby result: 101 seconds , 2. Java result:9.8 seconds, 3. Perl result:62 seconds Michael Tan Ruby 32 07-21-2005 03:23 PM
why does the show function not show anything? greenflame Javascript 6 06-18-2005 08:57 PM
"SQL Server does not exist or access denied" on a App Center node Christophe Niel ASP .Net 0 01-13-2004 10:56 AM
Command "show run" does not show all interfaces Peter Jonas Cisco 3 01-05-2004 12:13 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57