VB6 app using PDW Setup. Installs cleanly on XP, which has MDAC 2.8. Install on Vista yields the following two exceptions during Setup:
-- "The procedure entry point lstrcatl could not be located in the dynamic link library MSDART.DLL" (I clicked OK)
-- "Error registering MSADOX.DLL" (I clicked Ignore)
The app starts up okay on Vista and seems to run without problem. I've noticed the following:
-- The Version of MSDART.DLL on XP is 2.81.1117.0; on Vista it's 6.0.6000.16386
-- The Version of MSADOX.DLL is 2.81.1128 on both XP and Vista.
Yes, I ran Setup as an Administrator. I think I read somewhere that the MSADOX.DLL registration may fail because of the version difference but it's of little consequence because it's already registered on Vista - ??? I don't know what to think about MSDART.DLL. My primary question is whether or not these things are going to affect app execution under some conditions.
You can have multiple versions of MDAC on a system without issue. So the first error is because you may nnot have aliased the API declaration correctly (lstrcat not lstrcatl).
Code:
Private Declare Function lstrcat Lib "kernel32.dll" Alias "lstrcatA" (ByVal lpString1 As String, ByVal lpString2 As String) As Long
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
What about MDAC for other Windows versions? I included it in an XP install with the PDW without any problems. However, when I run Inno Script and specify 'None" for Minimum Win Version and XP for Minimum NT Version I get the following as missing files: VB_DCOM_MDAC_JET and scripten.exe. If I specify Me for Minimum Win Version and 2000 as Minimum NT Version, I get the same two files plus scr56en.exe.
You get those files missing in Inno Script because you selected them to be included and you did not point Inno Script to where they can be found. You ticked Scripting Runtime so that is why you are looking for scr56en.exe. You selected for and Auto OS Updater to be included and may not have downloaded it (or scr56en.exe). It has nothing to do with the OS you select for the target installation.
It is all explained in the instructions for Inno Script...
You must select the AUto OS Updater for your target system and download the proper one then include it in the search path to be found. The same goes for the scripting runtime files...
They are not missing in PDW for PDW is not as good at knowing these things as Inno Script is and besides those files are created for Inno Script to help the install go better. PDW will only be able to install one MDAC file while Inno Script can install multiple MDAC that you may need as well as PROPERLY installing the correct scripting runtime files for your target OS.
You may get lucky with PDW but Inno Script doesn't count on luck for a proper installation...
You can have multiple versions of MDAC on a system without issue.
I'm not so sure about that.
If you check I think you'll find that only the latest is installed. For example in the case of ADO, what you may think you see as earlier versions (from 2.0 on up) are actually TLBs that in some cases define a reduced set of functionality but all point to the latest msado15.dll on the system. You'll probably also see an "ADO Recordset" library (msador15.dll) as well, but this is a stub DLL that calls into msado15.dll. INFO: Maintaining Binary Compatibility in Components with ADOR.
DAO is another story but it isn't part of MDAC anymore anyway, like Jet.
Starting with Vista you have Windows DAC 6.0, there isn't any MDAC any longer. FAQ About Windows DAC/MDAC. If you're curious about the name change (pulling "Microsoft" out of the name) you might look at who actually did most of the work on Win XP SP2, Win 2003 R2, Vista, and Win 2008.
With Windows XP, however, Microsoft was forced to temporarily halt development on XP's successor, Windows Vista, in order to complete XP SP2. That's because this release, though provided to customers for free as a typical service pack, was in fact a major OS upgrade and was developed outside of the company's support structure, a first for any service pack release.
So is there a split coming? Well, all of this is pretty thin to hang a conspiracy theory on. More likely that quote is talking about Product Development instead of Support within Microsoft.
Last edited by dilettante; Nov 24th, 2007 at 02:34 PM.
On my Vista Ultimate system I have VS 6 SP-6 also installed so I cant say 100% but I do have ADO 2.0, 2.1, 2.5, 2.6, 2.7, 2.8, 6.0 and they all point to different tlbs.
Im doing a re-fromat/install this weekend so I can double check it before VS 6 is installed.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Re: VB6 MSDART.dll MSADOX.dll installation error on Windows XP/2003/Vista
Folks,
I finally figured out why my VB6 app that references ADO/ADOX component that works just fine on Win98/Win2000 suddenly got an error at installation/runtime on Windows XP/2003/Vista.
It's because the MDAC release that comes with Windows XP/2003/Vista with latest patches is 2.82 whereas the one on Win2000 is 2.81 (there is no 2.82 for Win98/2000 at this point).
Non working code:
MS ADOX EXT. 2.8 referenced in the project
Dim CatX as ADOX.Catalog
Dim TblX as ADOX.Table
Set CatX = New ADOX.Catalog
Set TblX = New ADOX.Table
...
>> Installing or running my VB6 app as is on any Win2003/XP/Vista will result in an error.
Workaround:
Remove MS ADOX EXT. from the project reference
Dim CatX as Object
Dim TblX as Object
Set CatX = CreateObject("ADOX.Catalog")
With CatX
.AcctiveConnection = MyAdoConnection
...
Set TblX = CreateObject("ADOX.Table")
With TblX
.Name = MyTableName
...
End With
...
End With
Tips:
> I code everything first with MS ADOX EXT. 2.8 referenced in my project and declare all my variables using Dim CatX as ADOX.Catalog...
> This makes my coding faster as all related ADOX methods and properties are displayed as I code.
> Then I go back and remove the MS ADOX EXT. reference from my project and re-code using CreateObject() method.
> Finally, redo the the PDW installation package and run the setup on any system Win98/2000/2003/XP/Vista.
> And voila, my VB6 app using ADOX now works on all platforms...
Hope this helps b/c I saw a lot of posts related to this subject but couldn't find any detail resolution methods anywhere...
Last edited by wildfins; Dec 4th, 2007 at 08:06 PM.