何备份一个表(dbgrid)中(dbf)?如何让grid中显示为零的数据显示为空?

解决方案 »

  1.   

    这样可以解决你的问题
    select case rtrim(aa1) when 0 then '' else aa1 end as aa1 into table2 from table1但你的table1里面的aa1 字段需要为字符形,如果不是的话,数字字段的''
    还是等于0
      

  2.   

    SQL:
    select case fieldvalue when 0 then '' else fieldvalue end from tablename如果是连的是TABLE,可加一计算字段!
      

  3.   

    用TField的OnGetText属性
    Write an OnGetText handler to perform custom processing for the DisplayText and Text properties. Use OnGetText to format the Value of the field differently when it must be edited from the format used when simply displaying the value, or use OnGetText to display something other than the field抯 value when it is displayed.The Sender parameter is the field component. The Text parameter receives the formatted text that is used by the DisplayText or Text property. The DisplayText parameter indicates whether the text will be used for display purposes only, or whether the string will be used for editing purposes.If there is no OnGetText handler, the value of the DisplayText and Text properties is simply the value of the AsString property.
      

  4.   

    备份表最直接的方法是用:BatchMove
      

  5.   

    ADOQuery那个字段的GetText属性
    begin
    if sender.AsInteger= o then
    Text:='Nll';
    end;
    OK !!!!