Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsReportsReportsAccessing data from Microsoft Access DatabaseAccessing data from Microsoft Access Database
Previous
 
Next
New Post
5/7/2009 4:11 AM
 

Hi all,

The question is in the subject, I have some problems accessing data from a Microsoft Access Database.
So, is it possible ? and if yes, anyone could tell me what is wrong in my settings :

Active Datasource = Generic ADO.NET datasource
ADO.NET Data Provider  = OleDb Data Provider
Connection String = provider=Microsoft.Jet.OLEDB.4.0;Datasource=D:\Database\Database.mdb;
Query = SELECT * FROM Table

Many thanks for your help
Jocelyn

 
New Post
5/7/2009 4:36 PM
 

Querying Microsoft Access is supported, and your settings do look correct.  What is the error message you are getting?


Andrew Nurse
DotNetNuke Core Team Member and Reports Module Project Lead
Microsoft Certified Professional Developer

 
New Post
5/11/2009 4:50 AM
 

Hi Andrew,

I receive this error message : There was an error executing the data source: An error occurred while executing the data source (Code: -2147467259): Unspecified error

Unfortunatly, I don't know where is the problem... The Access database is located on the same server as DNN but not in the site folder.
I assume that this folder must be accessed by DNN and then I've putted correct access rights (NETWORK SERVICE and ASPNET accounts have read/write access to the database folder.)

Hope it can help
Jocelyn

 
New Post
5/11/2009 1:37 PM
 

If you are running under medium trust, then no matter what the permissions are, the file is not accessible to the website.  So that might be one of the issues getting in the way.  If you are running your own server, it's less likely that you'll be in medium trust, but if you're in a shared hosting environment you probably ARE in medium trust.

I found a page describing the error you're getting (the error code you are getting is 80004005, so if you're looking for even more info, try a google search using the error code 80004005 rather than -2147467259), so that might provide some help.

 


Andrew Nurse
DotNetNuke Core Team Member and Reports Module Project Lead
Microsoft Certified Professional Developer

 
New Post
5/11/2009 6:08 PM
 

Jocelyn:

An alternative you may want to explore, and this depend on the level of access you have to your SQL Server, is to create a linked server from SQL Server to the MS-Access database.  I did this once but I only needed read-only access from the Access database, never tried writing to it this way.  I don't have a reference to the article with the details on how to do this right now but if you look you will find it.  I also used Views in SQL Server pointing to the tables I needed in the Access DB.  In this way all your DB transactions are via SQL Server, no need for direct access from your code to the Access DB.  You don't need to modify the Web.config either.

Hope this helps.

Carlos

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsReportsReportsAccessing data from Microsoft Access DatabaseAccessing data from Microsoft Access Database


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out