Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > database failure when publishing
 

database failure when publishing

I have access databases connected to my program.
I have set it to include both ov them when I publish, but somehow 1 of them does not get published, and I get an error when I am running my program.
Anyone has any idea on what I might have forgotten?
johmolan  Sunday, August 30, 2009 7:31 PM
Add both databases to your solution. Set "build action" = content, set "copy to output directory" as "copy always".

Go into the Application Files dialog and see if it is deploying them as Data or just as Include. If marked as data, it will move them to the ApplicationDeployment.DataDirectory folder. If you don't want it to move them, change them to "include".

Also, here's a thread that has a post from mewith two links in it; ittalks about how to deploy a database with your ClickOnce application. You might want to copy it to a folder outside of the deployment folders in order to ensure it doesn't get overwritten if you open and close the database.

http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/c8c55be6-be34-47cf-93fc-6cc0bf97f2cf

RobinDotNet

Click here to visit my ClickOnce blog!
RobinDotNet  Tuesday, September 01, 2009 3:14 AM
Are you using ClickOnce deployment (the publish tab) or a setup & deployment package?


RobinDotNet
Click here to visit my ClickOnce blog!
RobinDotNet  Monday, August 31, 2009 2:27 AM
I use the publish tab.
johmolan  Monday, August 31, 2009 7:33 AM
Add both databases to your solution. Set "build action" = content, set "copy to output directory" as "copy always".

Go into the Application Files dialog and see if it is deploying them as Data or just as Include. If marked as data, it will move them to the ApplicationDeployment.DataDirectory folder. If you don't want it to move them, change them to "include".

Also, here's a thread that has a post from mewith two links in it; ittalks about how to deploy a database with your ClickOnce application. You might want to copy it to a folder outside of the deployment folders in order to ensure it doesn't get overwritten if you open and close the database.

http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/c8c55be6-be34-47cf-93fc-6cc0bf97f2cf

RobinDotNet

Click here to visit my ClickOnce blog!
RobinDotNet  Tuesday, September 01, 2009 3:14 AM

You can use google to search for other answers

Custom Search

More Threads

• ClickOnce Won't Update a Application if it's passed command line arguments. Bug?
• Disable Self Repair?
• How to find the installation folder for the ClickOnce application
• Conditional file replacement during setup
• How to prevent a deployed application to restore registry keys?
• Do ClickOnce setup need access to the registry?
• How to specify an "Add or Remove Programs" entry Name for a ClickOnce Application
• IE Hanging for ClickOnce .Application File
• Using Map point 2004 in java swing
• Windows-based .NET execution permissions