deployment of visual basic widnows application 2005 dilemma

Posted on 2007-10-05
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
    LVL 5

    Accepted Solution

    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

    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
    LVL 1

    Author Comment

    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
    LVL 1

    Author Comment

    what do I do if I answered my question myself?
    LVL 11

    Expert Comment

    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

    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Normally the drop down box control found in the .Net framework tools is able to select just one data and value at a time, which is displayed on the text area.   But what if you want to have multiple values to be selected in the drop down box? As …
    A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now