Link to home
Start Free TrialLog in
Avatar of S_Charette
S_Charette

asked on

MS DataGrid error: Cannot initialize data bindings

I've just altered a VB app that I have no clue how to deploy.  It kept complaining about certain files so I added them one by one.  That seemed to work, but now when I connect to the database it gives me the following error:

MS DataGrid
Cannot initialize data bindings

What's going on here, and how do I fix it?  I must say I know next to nothing about VB, particularly on the deployment side.
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

From the start menu, you will find the Package & Deployement wizard (near the VB Shortcut) that will create a package (.cab) and a Setup.exe for you.
Avatar of S_Charette
S_Charette

ASKER

I need to be able to control the install a bit better than this wizard lets me, although I do appreciate knowing about it.  This will make testing easier :)

Essentially, though, I need to install this app along with another of our applications and I don't want to pop up another setup package in the middle of the installation.

Even still when running the setup created from the wizard I got errors.  Some files failed to register properly, and I'm not entirely sure why.
Have you included MDAC_TYP.EXE? If running on Win9x, you also need to install DCOM98.EXE before MDAC_TYP.EXE.

>>Some files failed to register properly, and I'm not entirely sure why.

Filenames and error messages would help a lot!
I included the MDAC component in my Installshield project which is supposed to automatically install DCOM, OLEDB and ODBC along side it.  I'm not sure if the exe does, but the component is supposed to.  The test machine is Win98 SE.

As for the errors, well I got it down to the one I mentioned in the main question as far as my install goes, but no further.

As for the deployment wizard, it first said that my files were out of date and asked if I wanted to update them.  I chose yes and had to re-run the setup after rebooting.  The error I'm currently getting is:

Component 'MSCOMCT2.OCX' or one of its dependancies is not correctly registered: a file is missing or invalid.

I got this error when running the application.  During the setup itself I got the following:

An error occurred while trying to register 'C:\Windows\System\msado21.tlb'
<Abort, retry, ignore>

Retry does nothing, on ignore I get

Failed to load resource DLL C:\WINDOWS\SYSTEM\oledb32a.dll
<OK>

Then

An error occurred while trying to register 'C:\Windows\System\msado21.tlb'
<Abort, retry, ignore>

Retry does nothing, when you press ignore it continues on and finishes.  The resulting install does what I outlined above.
msado21.tlb is not a file to distribute alone. It is included into MDAC_TYP.exe. Download and install the latest MDAC_TYP from www.microsoft.com/data, remove msado21.tlb from the installation and restart.
I didn't put it in the install myself, that error was from the setup created by VB.  MDAC 2.5 was installed prior to the installation.
Open the file name VB6DEP.INI. Find the key MSADO20.TLB and copy this block just under:

[MSADO21.tlb]
Dest=$(CommonFilesSys)\ADO
Replace=mdac_typ.exe
CABFileName=mdac_typ.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb6
CABRunFile=setup.exe
Well, there wasn't even an MSADO20.tlb entry in there :)  There was, however, an entry for MSADO15.tlb, so I put what you said in after that.

It got rid of the one error, but I'm still getting the oledb32a.dll error when I install along with the MSCOMCT2.OCX error when I run it. :/
You should not distribute oledb32a.dll because it is part of MDAC_TYP.EXE (see http://support.microsoft.com/support/kb/articles/Q296/7/30.ASP)

For MSCOMCT2.OCX, I suggest that you install the latest VB SP (which is 5).
I'm not distributing the file myself.  I did as you said and pointed the wizard to the VB project, and it took over from there.  I'll look to see if it's distributing it on its own.

I'll also try the service pack :)
Well, the service pack seemed to fix the oledb32a.dll error, but not the mscomct2.ocx error.

Would it be a bad idea to make a dependancy file and just make my own install set with those files?
This is my mscomct2.ocx dependency file:


; Dependency file for setup wizards.

[Version]
Version=6.0.88.4

; Dependencies for MSComCt2.ocx

; Default Dependencies ----------------------------------------------

[MSComCt2.ocx]
Dest=$(WinSysPath)
Register=$(DLLSelfRegister)
Version=6.0.88.4
Uses1=ComCat.dll
Uses2=
CABFileName=MSComCt2.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb6
CABINFFile=MSComCt2.inf

[ComCat.dll]
Dest=$(WinSysPathSysFile)
Register=$(DLLSelfRegister)
Uses1=

; Localized Dependencies --------------------------------------------

; ** German (DE) ***
; (0007 = German)
;
[MSComCt2.ocx <0007>]
Uses1=MSCc2DE.dll
Uses2=

[MSCc2DE.dll <0007>]
Uses1=
CABFileName=MSCc2DE.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb6
CABINFFile=MSCc2DE.inf

; ** French (FR) ***
; (000C = French)
;
[MSComCt2.ocx <000C>]
Uses1=MSCc2FR.dll
Uses2=

[MSCc2FR.dll <000C>]
Uses1=
CABFileName=MSCc2FR.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb6
CABINFFile=MSCc2FR.inf

; ** Italian (IT) ***
; (0010 = Italian)
;
[MSComCt2.ocx <0010>]
Uses1=MSCc2IT.dll
Uses2=

[MSCc2IT.dll <0010>]
Uses1=
CABFileName=MSCc2IT.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb6
CABINFFile=MSCc2IT.inf

; ** Spanish (ES) ***
; (000A = Spanish)
;
[MSComCt2.ocx <000A>]
Uses1=MSCc2ES.dll
Uses2=

[MSCc2ES.dll <000A>]
Uses1=
CABFileName=MSCc2ES.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb6
CABINFFile=MSCc2ES.inf

; ** Japanese (JP) ***
; (0011 = Japanese)
;
[MSComCt2.ocx <0011>]
Uses1=MSCc2JP.dll
Uses2=

[MSCc2JP.dll <0011>]
Uses1=
CABFileName=MSCc2JP.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb6
CABINFFile=MSCc2JP.inf

; ** Korean (KO) ***
; (0012 = Korean)
;
[MSComCt2.ocx <0012>]
Uses1=MSCc2KO.dll
Uses2=

[MSCc2KO.dll <0012>]
Uses1=
CABFileName=MSCc2KO.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb6
CABINFFile=MSCc2KO.inf

; ** Chinese Traditional (CHT) ***
; (0404 = Chinese Traditional)
;
[MSComCt2.ocx <0404>]
Uses1=MSCc2CHT.dll
Uses2=

[MSCc2CHT.dll <0404>]
Uses1=
CABFileName=MSCc2CHT.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb6
CABINFFile=MSCc2CHT.inf

; ** Chinese Simplified (CHS) ***
; (0804 = Chinese Simplified)
;
[MSComCt2.ocx <0804>]
Uses1=MSCc2CHS.dll
Uses2=

[MSCc2CHS.dll <0804>]
Uses1=
CABFileName=MSCc2CHS.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb6
CABINFFile=MSCc2CHS.inf
Ok, I made an install set myself that included a few files, and now the only error I am getting at any step of the way is the Datagrid one about the bindings.  The install from the package and deployment wizard still has problems, unless I manually register a few ocx's in which case it installs and runs fine.

That would tell me that the p&d wizard is registering something I'm not.  Is there any way to find out what it is?
Ok, I made an install set myself that included a few files, and now the only error I am getting at any step of the way is the Datagrid one about the bindings.  The install from the package and deployment wizard still has problems, unless I manually register a few ocx's in which case it installs and runs fine.

That would tell me that the p&d wizard is registering something I'm not.  Is there any way to find out what it is?
What are these OCX? Are they included in the package?
The OCX's that I registered manually are:

Comdlg32
Msadodc
Mscomct2
Mscomctl
Msdatgrd

By doing this the package made by the deployment wizard works perfectly, but I still get the data grid error on my own installation.  The opmtimal solution would allow me to fix the error in my installation so the user wouldn't have to go through a separate installation for a subset of the application, but I don't see why the P&D wizard setup would be missing these files.  I had installed DCOM98 before running the P&D wizard setup, and it was supposed to have included MDAC.
Can you show me the Setup.lst file.
Sure can :)  Here it is:

[Bootstrap]
SetupTitle=Install
SetupText=Copying Files, please stand by.
CabFile=QBDemo.CAB
Spawn=Setup1.exe
Uninstal=st6unst.exe
TmpDir=msftqws.pdw
Cabs=1

[Bootstrap Files]
File1=@VB6STKIT.DLL,$(WinSysPathSysFile),,,7/15/00 12:00:00 AM,101888,6.0.84.50
File2=@COMCAT.DLL,$(WinSysPathSysFile),$(DLLSelfRegister),,5/31/98 12:00:00 AM,22288,4.71.1460.1
File3=@STDOLE2.TLB,$(WinSysPathSysFile),$(TLBRegister),,6/3/99 12:00:00 AM,17920,2.40.4275.1
File4=@ASYCFILT.DLL,$(WinSysPathSysFile),,,3/8/99 12:00:00 AM,147728,2.40.4275.1
File5=@OLEPRO32.DLL,$(WinSysPathSysFile),$(DLLSelfRegister),,3/8/99 12:00:00 AM,164112,5.0.4275.1
File6=@OLEAUT32.DLL,$(WinSysPathSysFile),$(DLLSelfRegister),,4/12/00 12:00:00 AM,598288,2.40.4275.1
File7=@MSVBVM60.DLL,$(WinSysPathSysFile),$(DLLSelfRegister),,8/21/00 12:00:00 AM,1388544,6.0.89.64

[IconGroups]
Group0=QueryBuilder
PrivateGroup0=-1
Parent0=$(Programs)

[QueryBuilder]
Icon1="QBDemo.exe"
Title1=QueryBuilder
StartIn1=$(AppPath)

[Setup]
Title=QueryBuilder
DefaultDir=$(ProgramFiles)\QueryBuilder
AppExe=QBDemo.exe
AppToUninstall=QBDemo.exe

[Setup1 Files]
File1=@MDAC_TYP.EXE,$(AppPath),,,1/20/00 12:00:00 AM,7856352,25.0.4403.12
File2=@EXCEL.EXE,$(WinSysPath),$(EXESelfRegister),$(Shared),11/17/96 12:00:00 AM,5599504,8.0.0.3515
File3=@siQryBld.ocx,$(WinSysPath),$(DLLSelfRegister),$(Shared),3/2/01 9:27:42 AM,1110016,2.0.0.120
File4=@COMDLG32.OCX,$(WinSysPath),$(DLLSelfRegister),$(Shared),5/22/00 12:00:00 AM,140488,6.0.84.18
File5=@MSSTDFMT.DLL,$(WinSysPath),$(DLLSelfRegister),$(Shared),7/15/00 12:00:00 AM,118784,6.0.88.4
File6=@MSADODC.OCX,$(WinSysPath),$(DLLSelfRegister),$(Shared),5/22/00 12:00:00 AM,118976,6.0.88.4
File7=@MSDATGRD.OCX,$(WinSysPath),$(DLLSelfRegister),$(Shared),12/6/00 12:00:00 AM,262328,6.0.89.88
File8=@siComCtl.ocx,$(WinSysPath),$(DLLSelfRegister),$(Shared),10/2/00 6:51:38 PM,180224,1.0.0.27
File9=@MSCOMCTL.OCX,$(WinSysPath),$(DLLSelfRegister),$(Shared),5/22/00 12:00:00 AM,1066176,6.0.88.62
File10=@MSBIND.DLL,$(WinSysPath),$(DLLSelfRegister),$(Shared),5/11/00 12:00:00 AM,77824,6.0.88.62
File11=@QBDemo.exe,$(AppPath),,,5/22/01 9:35:53 AM,241664,1.0.0.72

; The following lines may be deleted in order to obtain extra
; space for customizing this file on a full installation diskette.
;
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX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
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
I would try not to include EXCEL.EXE into your package because you can't do it and because you need to install it on other computer using then Office installation.

After removing Excel, copy the .log here (taken from the folder where you are installing the application).
Here it is.  I must say I do appreciate your patience. :)



 %% PLEASE DO NOT MODIFY OR DELETE THIS FILE! %%
 %% This file contains information about the installation of an application. %%
 %% It will be used to automatically remove all application components from your computer if you choose to do so. %%


NOTE: Beginning of the bootstrapper section

CONFIG: Title: "QueryBuilder"

ACTION: RegKey: "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion", "SharedDLLs"

ACTION: SystemFile: "C:\WINDOWS\SYSTEM\VB6STKIT.DLL"
(File was not found or was an older version -- new file copied)

ACTION: SystemFile: "C:\WINDOWS\SYSTEM\COMCAT.DLL"
(File currently on disk was already up to date)

ACTION: SystemFile: "C:\WINDOWS\SYSTEM\STDOLE2.TLB"
(File currently on disk was already up to date)

ACTION: SystemFile: "C:\WINDOWS\SYSTEM\ASYCFILT.DLL"
(File currently on disk was already up to date)

ACTION: SystemFile: "C:\WINDOWS\SYSTEM\OLEPRO32.DLL"
(File currently on disk was already up to date)

ACTION: SystemFile: "C:\WINDOWS\SYSTEM\OLEAUT32.DLL"
(File currently on disk was already up to date)

ACTION: SystemFile: "C:\WINDOWS\SYSTEM\MSVBVM60.DLL"
(File was not found or was an older version -- new file copied)

ACTION: DllSelfRegister: "C:\WINDOWS\SYSTEM\COMCAT.DLL"

ACTION: TLBRegister: "C:\WINDOWS\SYSTEM\STDOLE2.TLB"

ACTION: DllSelfRegister: "C:\WINDOWS\SYSTEM\OLEPRO32.DLL"

ACTION: DllSelfRegister: "C:\WINDOWS\SYSTEM\OLEAUT32.DLL"

ACTION: DllSelfRegister: "C:\WINDOWS\SYSTEM\MSVBVM60.DLL"

NOTE: End of the bootstrapper section

NOTE: Now spawning the main Setup program 'Setup1.exe'....

ACTION: CreateDir: "C:\Program Files\QueryBuilder"

ACTION: CreateDir: "C:\WINDOWS\Start Menu\Programs\QueryBuilder"

ACTION: SharedFile: "C:\WINDOWS\SYSTEM\siQryBld.ocx"
(File was not found or was an older version -- new file copied)

ACTION: SharedFile: "C:\WINDOWS\SYSTEM\COMDLG32.OCX"
(File was not found or was an older version -- new file copied)

ACTION: SharedFile: "C:\WINDOWS\SYSTEM\MSSTDFMT.DLL"
(File was not found or was an older version -- new file copied)

ACTION: SharedFile: "C:\WINDOWS\SYSTEM\MSADODC.OCX"
(File was not found or was an older version -- new file copied)

ACTION: SharedFile: "C:\WINDOWS\SYSTEM\MSDATGRD.OCX"
(File was not found or was an older version -- new file copied)

ACTION: SharedFile: "C:\WINDOWS\SYSTEM\siComCtl.ocx"
(File was not found or was an older version -- new file copied)

ACTION: SharedFile: "C:\WINDOWS\SYSTEM\MSCOMCTL.OCX"
(File was not found or was an older version -- new file copied)

ACTION: SharedFile: "C:\WINDOWS\SYSTEM\MSBIND.DLL"
(File was not found or was an older version -- new file copied)

ACTION: PrivateFile: "C:\Program Files\QueryBuilder\QBDemo.exe"
(File was not found or was an older version -- new file copied)

ACTION: DllSelfRegister: "C:\WINDOWS\SYSTEM\siQryBld.ocx"

ACTION: DllSelfRegister: "C:\WINDOWS\SYSTEM\COMDLG32.OCX"

ACTION: DllSelfRegister: "C:\WINDOWS\SYSTEM\MSSTDFMT.DLL"

ACTION: DllSelfRegister: "C:\WINDOWS\SYSTEM\MSADODC.OCX"

ACTION: DllSelfRegister: "C:\WINDOWS\SYSTEM\MSDATGRD.OCX"

ACTION: DllSelfRegister: "C:\WINDOWS\SYSTEM\siComCtl.ocx"

ACTION: DllSelfRegister: "C:\WINDOWS\SYSTEM\MSCOMCTL.OCX"

ACTION: DllSelfRegister: "C:\WINDOWS\SYSTEM\MSBIND.DLL"

ACTION: ShellLink: "QueryBuilder", "QueryBuilder"

ACTION: RegKey: "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion", "App Paths\QBDemo.exe"

ACTION: RegValue: "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\QBDemo.exe", ""

Your components are correctly registered! I can see it by the log which is telling:

ACTION: DllSelfRegister: "C:\WINDOWS\SYSTEM\COMDLG32.OCX"

ACTION: DllSelfRegister: "C:\WINDOWS\SYSTEM\MSSTDFMT.DLL"

ACTION: DllSelfRegister: "C:\WINDOWS\SYSTEM\MSADODC.OCX"

ACTION: DllSelfRegister: "C:\WINDOWS\SYSTEM\MSDATGRD.OCX"


No error appears there. It should work now. Is it?
Well, I still had to register mscomct2.ocx myself in order for it to run, but it worked this time when I did so.

So, if I were to install using Installshield instead of the deployment wizard, what files beyond MDAC and DCOM would I need to deploy?
mscomct2.ocx is not in your package (.lst file). If you include it, you won't need to do anything.

About InstallShield, be sure that all the files listed in the .lst file are included into the InstallShield package.
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry this took so long, but I was put on something else for a while.

What you said worked perfectly.  I'm just tweaking my install set now.  Thank you very much for your patience! :)
Sorry this took so long, but I was put on something else for a while.

What you said worked perfectly.  I'm just tweaking my install set now.  Thank you very much for your patience! :)
Sorry this took so long, but I was put on something else for a while.

What you said worked perfectly.  I'm just tweaking my install set now.  Thank you very much for your patience! :)