在多层结构中,客户端如何能根据应用程序服务器提供的信息来实现数据约束呢?我的Dataset用的是ADO,根据Delphi的Help,ADODataSet不能像BDE组件那样,从数据库中获取数据约束条件。请问如何解决呢?

解决方案 »

  1.   

    what kind of constrain?
    I think you can do it in the sql.
      

  2.   

    For example, the data of this field is not null, unique and so on.How can I do this in the sql?  Could you tell me, please!
      

  3.   

    英文不太好,你们越说我越糊涂
    select FIELD1 from TABLE1 where FIELD2 is NULL
      

  4.   

    举个例子,OneTable表中有两个字段——ID、Value。  ID字段为Primary Key,约束为Not NULL,Unique。
      Value字段的约束为 (Value >=0 ) and (Value <= 100)。  如何能够在客户端(请注意,是三层结构的客户端上)实现这个数据约束??
      

  5.   

    clientdataset.fieldbyname('id').isnull
     变量:=clientdataset.fieldbyname('Value')
    (变量>=0)and(变量<=100)
      

  6.   

    To hb8069:  你可能没理解我的意图。我的这个约束条件应该从应用服务器动态获得,而不是预先写死在客户端,否则程序很难维护的。
      

  7.   

    请参考http://community.borland.com/article/0,1410,26409,00.html