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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Runtime error when applying information to web Access DB.Runtime error when applying information to web Access DB.
Previous
 
Next
New Post
1/10/2008 3:03 PM
 

Hello All,

     I am having a problem inserting data into an Access Database. Im using Visual Studio Developer with an AccessDataSource object to connect to the database and a Gridview object to access the database information and displaying. There is no problem when displaying the information, the Gridview object is populated from the database and shows all correct information. The problem im having is when trying to manipulate the information in the database in any way. One example is when I set up the AccessDataSource control I select all the fields and click Advanced with brings me to the screen where i enable the check box for Generate Insert, Update, and Delete queries. This gives me the option on my Gridview to add the Edit, Delete, or Update the information that is being populated by the Gridview. When I actually try to edit any of the information im getting a Runtime error, this occurs with Update, Select, Edit anything that actually modifys the data in the database. I have also tried elimating the gridvew object and just running an Insert Query from the AccessDataSource. Just a basic Insert Query shown below :

 INSERT INTO [Inclearing] ( [InclearingProcessed], [InclearingSpreadsheet]) VALUES ( InclearingProcessed, InclearingSpreadsheet)

The is run from the AccessDataSource.Insert propery. I call the property by a Commandbutton with code AccessDataSource.Insert()

Which have defined Perameters to Textboxes.

 Now when i use this on my Local Computer Everything works fine and it addes the information to the database in the appropriate spots. However, once i transfer my site to the Web host i get the runtime error when trying to modify the information. However, the Gridview object still populates when it is on the webserver so I know the AccessDatasource is still getting a connection.

 Putting everything aside, If my gridview object is being populated by the information in the Database on the Webserver, when modifying the information directly from the gridview that I know has a Database Connection I should be able to manipulate the data. This is when i get the Runtime error.

Any Suggestions besides telling me to use straight ADO code. There is no reason that I can see why this wouldnt work.

 Is it a possiblity that when the the website is initially opened the Gridview Calls the information from the Access DB and populates the Gridview then terminates the connection to the DB, which wouldnt allow me to manipulate the data or does it keep the connection?

 Help!

 

Thanks, 

 
New Post
1/10/2008 3:34 PM
 

My ugess is that your hosting provider is only allowing read access to the ASP.NET worker process on your hosted server.

You might contact the hosting provider to ensure that the ASP.NET process has full permissions to the file.


-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
New Post
1/10/2008 4:10 PM
 

As Mitch indicated, the problem is most likely due to the ASP.Net worker process NOT having write permission on both the Access .mdb file AND the database folder. 

Although you did not specify the exact error message you are getting, if it is something like "Operation must use an updatable query" then this is most likely the problem.

If, on the other hand, the error message is something like "Request for the permission of type "System.Data.OleDb.OleDbPermission . . . failed" then it is because the host is not allowing OleDb updates to the database in a Medium Trust Environment. When shared hosting first started moving to ASP.Net 2.0, this was a real problem but now most of the ones that I've used that allow MS Access databases have extended their security policies to add OleDbPermission back into medium trust policy.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Runtime error when applying information to web Access DB.Runtime error when applying information to web Access DB.


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