Datagrid cannot initialize data binding -- deploy problem develop on XP-> deploy to Win2k

Posted on 2005-05-04
Last Modified: 2013-12-25
Hello crew.

Deployed application opens a dialog saying "Datagrid cannot initialize data binding".
It seems a XP->Win2k deployment problem.

Description: VB6 SP5 installed on WinXP. Need to deploy to Win2k system (could not resist using Xp for myself).
Application uses among other ocx-es msdatgrd.ocx.
If I use previously made intall package and only overwrite myapp.exe, application starts but grid is empty. SO I guess there is still error but it appears not to be critical. Yet it is still an error.

I installed MDAC 2.8 on target system and it still doesn't help. Same error.

So what is the catch that XP-prepared package does wrong in comparison to "old" package ?

When analyzing the myapp.exe cracking point, I see that my datagrid only appears to have 1 column while it should have 3. And when I rename the columns in runtime, accessing 2nd column causes error because binding was not proper etc.

What resources is binding task trying ta access that it does not get ?
What to do ?
What additional info do you need to be able to help ?


Question by:gregajesih
    LVL 10

    Expert Comment

    Hi, gregahesih.

    Possibly the solution at this site will help:

    See the "found the solution" comment by magikandrea on 2-23-2004 at 4:25 pm.

    Author Comment

    Sorry for respense delay. Server was down.
    Manual registration with regsvr32 of MSBIND.DLL did not help. Same error reported: Cannot initialize data bindings..

    LVL 10

    Accepted Solution

    Sorry that didn't help.  Here are three other potential solution sources.  For the EE posts, I've pasted the core of the accepted answers, but if that doesn't fix the issue, read through those posts completely, as minor adjustments per your deployment may be required:

    These two cover your error specifically:
    "Copy and register msstdfmt.dll"
    "mscomct2.ocx is not in your package (.lst file). If you include it, you won't need to do anything"

    This link may apply, as you mentioned a disparity between designed column count (3) and run-time (1):;en-us;224192
    "DataGrid Is Not Populated Using Jet.OLEDB.4.0 Provider and ADO Server Side Cursor"

    Author Comment

    edwardIII, now this is bizzarre:

    I tried all you said and it did not work. Then, I uninstalled my application from server. SInce I discovered that all the needed dll-s and ocx-es are already on the target server, I only copyed myapp.exe there and started it.

    IT WORKED !!!

    At this point I decided to close this case temporarily now...



    Author Comment


    my question reopened and then I solved it partially with MDAC_TYP 2.8 and partially by registering old msstdfmt.
    So I accept your answer.

    LVL 10

    Expert Comment

    Hope this solution keeps on working; sounds like a frustrating situation:)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Introduction This article makes the case for using two modules in your VBA/VB6 applications to provide both case-sensitive and case-insensitive text comparison operations.  Recently, I solved an EE question using the LIKE function.  In order for th…
    When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

    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

    13 Experts available now in Live!

    Get 1:1 Help Now