[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
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.
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. :)
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.
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.
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.
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:
Private Sub Form_Load()
If Right(App.Path, 1) = "\" Then
Data1.DatabaseName = App.Path & "MAPS\ROE6.mdb"
Else
Data1.DatabaseName = App.Path & "\MAPS\ROE6.mdb"
End If
End Sub
JungleJim :)
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:
sAppPath = App.Path
If Right(sAppPath, 1) <> "\" then sAppPath = sAppPath & "\"
In this way you can use sAppPath anywhere in your application and it will always be correct.