473,327 Members | 2,094 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Newbe: Datagrid only displays headers and no data on ASP.net application

I'm trying to get some data to display in a datagrd on an ASP.net page
The only thing It displaus is the header
here are somr snoppets of the code:

Me.OleDbConnection1.ConnectionString = "Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry
Path=;Jet OLEDB:Database L" & _
"ocking Mode=1;Jet OLEDB:Database Password=;Data Source=""C:\Inetpub\wwwroot\DataG" & _
"rid Test\E-Logbook.mdb"";Password=;Jet OLEDB:Engine Type=5;Jet OLEDB:Global Bulk " & _
"Transactions=1;Provider=""Microsoft.Jet.OLEDB.4.0 "";Jet OLEDB:System database=;Jet" & _
" OLEDB:SFP=False;Extended Properties=;Mode=ReadWrite;Jet OLEDB:New Database Pass" & _
"word=;Jet OLEDB:Create System Database=False;Jet OLEDB:Don't Copy Locale on Comp" & _
"act=False;Jet OLEDB:Compact Without Replica Repair=False;User ID=Admin;Jet OLEDB" & _
":Encrypt Database=False"

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load

'Put user code to initialize the page here
'
' OleDbDataAdapter1.Fill(DataSet11, "Entry")
'
DataGrid1.DataBind()
Label1.Text = DataSet11.Tables.Count
' This tells me that the dataset has 1 table is loaded

End Sub

If I put the "OleDbDataAdapter1.Fill(DataSet11, "Entry")" code in it gives me a configuration error:

Description: An error occurred during the processing of a configuration file required to service
this request. Please review the specific error details below and modify your configuration file
appropriately.

Parser Error Message: The 'mode' attribute is case sensitive and must be one of the following
values: On, Off, RemoteOnly.

I can preview the data in the the OledbAdapter1

It's been a frustrating day fighting with this problem
Nov 20 '05 #1
2 2574
The error below has to do with the CustomErrors section of your Web.Config
file. Check the setting in that section.
"Start28" <St*****@Hotmail.com> wrote in message
news:rp********************************@4ax.com...
I'm trying to get some data to display in a datagrd on an ASP.net page
The only thing It displaus is the header
here are somr snoppets of the code:

Me.OleDbConnection1.ConnectionString = "Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database L" & _
"ocking Mode=1;Jet OLEDB:Database Password=;Data Source=""C:\Inetpub\wwwroot\DataG" & _ "rid Test\E-Logbook.mdb"";Password=;Jet OLEDB:Engine Type=5;Jet OLEDB:Global Bulk " & _ "Transactions=1;Provider=""Microsoft.Jet.OLEDB.4.0 "";Jet OLEDB:System database=;Jet" & _ " OLEDB:SFP=False;Extended Properties=;Mode=ReadWrite;Jet OLEDB:New Database Pass" & _ "word=;Jet OLEDB:Create System Database=False;Jet OLEDB:Don't Copy Locale on Comp" & _ "act=False;Jet OLEDB:Compact Without Replica Repair=False;User ID=Admin;Jet OLEDB" & _ ":Encrypt Database=False"

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

'Put user code to initialize the page here
'
' OleDbDataAdapter1.Fill(DataSet11, "Entry")
'
DataGrid1.DataBind()
Label1.Text = DataSet11.Tables.Count
' This tells me that the dataset has 1 table is loaded

End Sub

If I put the "OleDbDataAdapter1.Fill(DataSet11, "Entry")" code in it gives me a configuration error:
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: The 'mode' attribute is case sensitive and must be one of the following values: On, Off, RemoteOnly.

I can preview the data in the the OledbAdapter1

It's been a frustrating day fighting with this problem

Nov 20 '05 #2
On Sun, 14 Dec 2003 19:05:56 -0500, "Scott M." <s-***@BADSPAMsnet.net> wrote:
The error below has to do with the CustomErrors section of your Web.Config
file. Check the setting in that section.
"Start28" <St*****@Hotmail.com> wrote in message
news:rp********************************@4ax.com.. .
I'm trying to get some data to display in a datagrd on an ASP.net page
The only thing It displaus is the header
here are somr snoppets of the code:


Thanks for the reply. I checked the web.config but all where OK.

I finally found the solluton to my problem on the newsnet

quote....

There are many different solutions to this. Here are a couple:

1. Pass your username and password to the database in your connection
string, assuming you want to use SQL Server authentication.
2. If you are using Windows Authentication in SQL Server (or mixed), you
will need to enable impersonation in your web.config, turn off anonymous
access, and set the allowed users in your web.config.

For item 2, you can also use WindowsIdentity.GetCurrent.Name to check and
see if the logged on user is IUSR and send back a 401 to force
authentication. In either case, you will need to enable impersonation so
that the logged on user doesn't show as the ASPNET account.

--

un-quote

Turning off ananymous access in IIS did the trick
Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Ashish Shridharan | last post by:
Hi All I have been trying to add a control to the header cell of a datagrid on my ASP.NET page. These controls are defined in the HTML as ASP.NET web controls. They are being added into the...
6
by: JeffB | last post by:
I have tried several different methods of getting a datagrid to fill with information. Below is the code I'm now using. When viewed in the browser and the text box filled with a parameter value...
1
by: Ruy Castelli | last post by:
Hello, I'm learning to code in C# and I created a DataGrid component, which I couldn't get it to work properly either using "Next >>" and "<< Previous" buttons or using actual page numbers. ...
4
by: ElenaR | last post by:
I am having two issues with my datagrid. First, my column headers are not displaying. Second, the grid runs and displays correctly (except the headers) the first time. When the grid runs for the...
0
by: Mike Gorgone | last post by:
Hi All, I'm currently trying to show a datagrid with a parent and child table realtionship. I've got the expansion icon (+) in the row headers and when I click on it I see the link to the child...
0
by: letsgetsilly | last post by:
I am populating a datagrid and outputting it to excel. Everything worked well last night, but today excel only displays the content in font color white, which is impossible to see. The data is all...
9
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the...
0
by: rn5a | last post by:
A DataGrid control displays records from a SQL Server 2005 DB table. The AllowSorting property of the DataGrid has been set to True & the SortExpressions of the BoundColumns have been set to the...
8
by: Brock | last post by:
I am trying to populate a Crystal Report from data in my DataGrid. The reason for this is that I want the user to be able to change values without updating the database, but still have their report...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.