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

S

Start28

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
 
S

Scott M.

The error below has to do with the CustomErrors section of your Web.Config
file. Check the setting in that section.


Start28 said:
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" & _
 
S

Start28

The error below has to do with the CustomErrors section of your Web.Config
file. Check the setting in that section.

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top