System.Data.OleDb.OleDbException: Unspecified error

Posted on 2012-04-03
Last Modified: 2012-04-03
i changed this:

 <asp:DropDownList ID="ddlProducts" runat="server" DataSourceID="AccessDataSourceProducts"
                        DataTextField="ProductName" DataValueField="ProductID" 
                        AppendDataBoundItems="True" Width="302px" TabIndex="9019"  
                         <asp:ListItem Text="" Value="" />

Open in new window

into this:

  If e.Row.RowType = DataControlRowType.DataRow Then
            Dim cmd As New OleDb.OleDbCommand("SELECT DISTINCT * FROM [Products] ORDER BY ProductName ", con)

            Dim ddlProducts As DropDownList = CType(e.Row.FindControl("ddlProducts"), DropDownList)

            Dim da As New OleDbDataAdapter(cmd)

            Dim ds As New DataSet()

            ddlProducts.DataTextField = ds.Tables(0).Columns("ProductName").ToString()
            ddlProducts.DataValueField = ds.Tables(0).Columns("ProductID").ToString()

            ddlProducts.DataSource = ds.Tables(0)


        End If

Open in new window

and now i get this error:
System.Data.OleDb.OleDbException: Unspecified error

Do i need to Dispose/Close something else? error is only there when alot of data is pulled from the database. I only have this issue when the website is published on the server. Locally i don't get this error. IIS as webserver
Question by:Amien90
  • 3
  • 3
LVL 21

Expert Comment

ID: 37803587
I think it should be some permission issue in the server. Have a look here

hope this helps!

Author Comment

ID: 37803623
why? i have a gridview that contains dropdownlist .. i'm populating these droplists.

When i create 25 rows no problem, when i create 100 rows i get the above error? can that still be a permission error?
LVL 21

Expert Comment

ID: 37803773
Did you go through that link. If the ASP.NET account in the server does not have permission to access the database then it can throw this error!
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.


Author Comment

ID: 37803788
yes .. but the server has full permission.

I dont see a permission issue when 25 rows are no problem and 100 rows are a problem. How can permission be a problem? i also split the 100 rows into 4 parts and those 4 parts are also no problem
LVL 21

Accepted Solution

masterpass earned 500 total points
ID: 37803856
can you try this


Dim ds As New DataSet()


Open in new window


Author Closing Comment

ID: 37804093

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Entity Framework 7 43
how to change the view engine in visual studio 2015 enterprises edition 7 49
Regex validation 2 25
imap mails 1 23
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question