Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Program crashing "Unhandled OleDbException" when installed though Program runs perfectly without Installation.
 

Program crashing "Unhandled OleDbException" when installed though Program runs perfectly without Installation.

I have a program that views, edits, deletes, adds records to an Access database. Up until the last install package I have been having issues with the Setup and Deployment project.

*This program runs fine under VS2008.
*When running the release version, I copied it to a folder on the desktop (just the .exe and the Access file) and it runs fine.

However, when I have the program installed view the Setup an Deployment project, the program throws an "Unhandled OleDBException" when trying to modify/delete/add a record.

The particular part where it is complaining at has the try/catch OleDbException. I can't figure out for the life in me why the program when installed via SetUp and Deployment project fails at this particular action but the program runs fine on its own outside on the desktop.
MMSarria  Monday, September 21, 2009 2:12 PM
What is the exception exactly? I'd assume that there might be a clue in there if (for example) it just can't find the database. And where exactly does it happen - when you open the DB? Get the record? Store it back? Without more detail this is tough to figure out.
Phil Wilson
PhilWilson  Monday, September 21, 2009 8:13 PM
Hello MMSarria,

Do you configure the connection string properly after install? Does the Access file located in your application folder? If the assess file is missing, you will have to add it manually into the “Application Folder�in setup project. If all the necessary files are there, you may consider a run time debugging.

To do the runtime debugging, add “System.Diagnostics.Debugger.Break();�into the function which do the update/insert/delete. After you install the application, please run it and do the update/insert/delete operation. It will hit the break point and let you debug the source code.

Hope this helps you to find the problem. If you have any problem, please feel free to tell me.

Sincerely,
Kira Qian
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework!
Kira Qian  Wednesday, September 23, 2009 6:54 AM

You can use google to search for other answers

Custom Search

More Threads

• saving a connection string in app.config
• Installing prerequisites
• easy question about installation
• Multi Disk Setup in VS 2005
• Change the default install directory
• Monitor FTP Site
• VS2008 vs VS2005 deployment compatibility problems
• is any book i can have to learn more about deploying my windows application
• Modifying manifests programatically on site
• Clickonce