我也遇到了同样的问题,指针为空会立即弹出一个ASSERT断言错误
不过我这还有一个特殊情况要说明一下,供大家分析
如果不将网格空间和ADO的数据源控件绑定在一起,
则程序会一切正常。真有趣。
望各路大虾来会诊一下。^_^
                           

解决方案 »

  1.   

    我先贴一篇相关清华的精华文章,不过可能不对症发信人: flea (痘面飞龙), 信区: Database 
    标  题: Re: 请问DataGrid的问题 
    发信站: BBS 水木清华站 (Wed Oct 10 14:58:14 2001) 
      
    问题解决了! 
    多谢一位网友提醒到:groups.google.com去搜一把, 
    什么疑难杂症都有讨论。 
    同样的问题也有人问,最终在一篇大概是德文的文章里头找到答案: 
      
    Distributing Dependent Files: Often, it is not enough to ship the ActiveX 
    control with your application. The control may come with other dependent 
    files that should be distributed along with the ActiveX control. For 
    example, the new data-bound controls should be distributed with the binding 
    manager (MSBind.dll) and the formatting objects (MSStdFmt.dll) DLLs. These 
    objects provide support for common databinding functionality, and the 
    data-bound controls will not bind properly without them. 
      
    其实这是来自MSDN,我在MSDN里面用msbind.dll查找了一下,果然也找到这段话。 
      
    小结: 
    1 MSDN里面还有很多你没有发现的有价值的信息。 
    2 如果绝望了,就到groups.google.com上试试运气吧。:)   
    【 在 flea (痘面飞龙) 的大作中提到: 】 
    : VC的一个程序在98下运行时,出现"cannot initialize data bindings"的错误提示, 
    : 该程序有一个MsDataGrid的控件,一个MsAdodc的控件, 
    : DataGrid的数据来源设定为Adodc, 
    : 该程序在2000下工作正常。 
    : 请问问题出在什么地方?怎么解决? 
    : 多谢。 
      
      
    --