deployment of visual basic widnows application 2005 dilemma

Posted on 2007-10-05
Medium Priority
Last Modified: 2013-11-26
I have deployed my program successfully in terms the users can save and retrieve the data.  What I am having issues with is opening various pdf's files.  What my program does is it pulls various pdf reports when the users conduct their search and when the user double clicks on a specific report found in a datagrid, it open up on my development machine, but not after deployment.  I have zipped over 50 pdf's into a zip folder which I added to Application folder and set the path to the zip folder where all the reports will be located after installation of the program.  
When I double click on the found report, I generate an error that"the system cannot find the file specified", but the report is there in an zipped file and the path to it is set withi an ACCESS 2007 database.
I am not familiar with how you can read the reports through the interface of the software that are located within a zip folder.
I even tried unzipping the folder that contrains all these pdf's and that generated the same error.
Can someone with knowledge with this issue please help me?
Question by:systems_ax
  • 3
  • 2

Accepted Solution

Colemss earned 1400 total points
ID: 20025719
If it is working in development and bot in production then you have a path issue.  Trap the error correctly and print the path\file you are trying to open.  It will most likely make sense then.
LVL 11

Assisted Solution

AkisC earned 600 total points
ID: 20026981
It looks like a path problem.

in your main declarations, declare
Public myAppPath As String = ""
-then- when you start your application call SetAppPath()
all your references to files and paths, include the myAppPath
dim pdfFileToRead as string=myAppPath & "MypdfDirectory\thisfile.pdf"

    Public Sub SetAppPath()
        myAppPath = Application.StartupPath
        myAppPath = myAppPath.Replace("\Debug", "")
        myAppPath = myAppPath.Replace("\bin", "")
        myAppPath = RemoveBackSlash(myAppPath) & "\"
    End Sub
    Public Function RemoveBackSlash(ByVal mPath As String) As String
        If mPath.EndsWith("\") Then
            Return mPath.Remove(mPath.Length - 1, 1)
            Return mPath
        End If
    End Function

Author Comment

ID: 20059987
it was much simpler than that.  all I had to do is add a regular foler to application folder and populate it with reports.
thanks for helping
[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.


Author Comment

ID: 20059997
what do I do if I answered my question myself?
LVL 11

Expert Comment

ID: 20060638
You can request to close the question, with points refunded
simply award the points to one answer or more

My point of view.
When I ask a question I beleive that I take advantage of all the experts knowledge
I award points for an answer I get (cost-nothing {no-money}) and I get valuable answers (experts' time=money)

Have fun coding...
LVL 11

Expert Comment

ID: 20060675
And indeed it was a "path issue" http:#20025719"-or- a "path problem" http:#20026981
I would award all points to Colemss as he/she was the first to point to the problem

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
Integration Management Part 2
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

569 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question