Results 1 to 8 of 8

Thread: [RESOLVED] My Package & Deployment problem restated

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2006
    Posts
    29

    Resolved [RESOLVED] My Package & Deployment problem restated

    I am using VB6 Pro and Win XP Pro. I have a project that uses the ADO Control in VB. I have tried to create a setup file for one of my projects and put it on my 98 machine. I have used both the Package and Deployment Wizard and Inno Setup but in both cases, when I run it on the 98 machine I get an error: D:\ROE\Support\ROE6.mdb is not a valid path. I have tried using App.Path & "\Support\ROE6.mdb" in the DatabaseName of the Control but this also gets an error: Not a valid path. The program works just fine when I run it on the XP Pro machine. I have read over 20 threads in this forum and at least one of them recommended Inno Setup, that is the reason I downloaded it and tried to use it. I have been studying and reading for several days now and could sure use some help. I am beginning to think that you simply cannot use the ADO Control in a Pkg&Dep setup file. Thanks in advance for any help. JungleJim

  2. #2
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: My Package & Deployment problem restated

    JungleJim,

    As far as installing an XP installation on 98, there are several things that you need to know and understand. Please read Installation Problems in my signature for more insight on the problem.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jan 2006
    Posts
    29

    Re: My Package & Deployment problem restated

    Thanks randem, I took your advice and read some of the postings under your name and did get some help. I do include DCOM98 in the package when I plan to install it on my 98 machine. I went ahead and installed it on the XP Pro on that same machine (I have is setup in a dual boot to either Win 98SE or Win XP Pro as I have XP Pro on both machines) but I have the identical same problems when I install it on the XP Pro. To me, this indicates the the install setup is working OK but that something in the package is not right. I believe that I can get it to work by creating the same directory on the Drive D: of the 98 machine and copying the database there from the PC I am using to create the package but I should not have to do this. All the files necessary for the application to run on the other machine are supposed to be in the setup package. How about if I leave the Database property blank and then set that property at run time. Wouldn't this put the .mdb file in the App.Path\Maps folder so that VB can find it? TIA for any help. JungleJim.

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,692

    Re: My Package & Deployment problem restated

    The database will go where you tell Inno or P&D to put it. Why not just put it into the directory the program is in, then point the program to App.Path & "\ROE6.mdb"? Then you don't have to worry about differences between computers.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  5. #5
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: My Package & Deployment problem restated

    JungleJim,

    As far as the database, the problem is where your control is looking. Are you dynamically putting this folder name in the control at run time? When you use App.Path you need to check for the existance of the trailing backslash. I believe Win98 put it there and anything after WinNT does not end it with a backslash. This will leave you not being able to find the database on one machine.

    Let's see the code you use to setup your control.

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Jan 2006
    Posts
    29

    Re: My Package & Deployment problem restated

    Thank you randem. I printed your "Installation Problems?" and studied it more thoroughly and got some good infor and pointers from it. But, as far as getting my application to run successfully on my 98 machine, all I did was set the DatabaseName property of the DAO Control at runtime. At design time, VB doesn't know what the App.Path is so it will not accept this in the property DatabaseName. But it sure works great when I set it at runtime. Thanks for your help. JungleJim.

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Jan 2006
    Posts
    29

    Re: [RESOLVED] My Package & Deployment problem restated

    randem said "Lets see the code you use to set up your control. Here it is.
    VB Code:
    1. Private Sub Form_Load()
    2. If Right(App.Path, 1) = "\" Then
    3.     Data1.DatabaseName = App.Path & "MAPS\ROE6.mdb"
    4.   Else
    5.     Data1.DatabaseName = App.Path & "\MAPS\ROE6.mdb"
    6.   End If
    7. End Sub
    JungleJim

  8. #8
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: [RESOLVED] My Package & Deployment problem restated

    That looks good. But you might want to set a global variable for the App.Path once for you whole program.

    I.E. At program load
    VB Code:
    1. sAppPath = App.Path
    2. If Right(sAppPath, 1) <> "\" then sAppPath = sAppPath & "\"
    In this way you can use sAppPath anywhere in your application and it will always be correct.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width