• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 438
  • Last Modified:

attaching a microsoft access database to a clickonce deployed application

I have attached a microsoft access database to a clickonce application though propertis, publish, application files,  database  set to include and required.

I get the error messege "Disk or network error" when i try to un the application.

a
0
Anthony Matovu
Asked:
Anthony Matovu
  • 2
2 Solutions
 
jppintoCommented:
0
 
CodeCruiserCommented:
What path do you use in your connection strings? Is it relative path?
0
 
Anthony MatovuBusiness Analyst, MTN UgandaAuthor Commented:

I got this from jppinto's post

        If ApplicationDeployment.IsNetworkDeployed Then
            dataPath = ApplicationDeployment.CurrentDeployment.DataDirectory
        Else

            dataPath = System.Windows.Forms.Application.StartupPath & "\Resources"
            dataPath = System.IO.Path.Combine(dataPath, "fxbDbase.mdb")
        End If
0
 
CodeCruiserCommented:
Is the db in same folder as exe when deployed? Use just the dbname then without path.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now