在我的表中一个字段使用GUID,现在我要根据一个给定的GUID来过滤数据,使用如下方式却出错,不知道该怎么做?
Guid guid="";//赋值
this.bindingSource.Filter=string.Format("col={0}",guid);//对于整数,该方法正确
现在请问怎么改?

解决方案 »

  1.   

    Hello,
    How do I move to a position in a bindingsource that matches a primary key value?I seem to be having a problem with the bindingsource.find property.  
    I need to be able to move to a specific bindingsource position that contains a specific GUID.I was trying to use:
    BindingSource.Position = BindingSource.Find("Guid", TempGUID)The error is: Specified method is not supported.
    How do you get it to work when using GUID ?Thanks,上面是在网上搜到的一个类似问题,不过也没有人解答
      

  2.   

    Guid guid="";//赋值
    this.bindingSource.Filter=string.Format("col='{0}'",guid);//对于整数,该方法正确