用DataModule的時候用Ttable.OPEN方法時報錯﹐說訪問了只讀什么什么的。
環境﹕delphi6 +win2000

解决方案 »

  1.   

    说清楚一点,DataModule肯定能用。呵呵
    很可能你的数据库没打开呀。
      

  2.   

    说说你的Table都如何设置的?
      

  3.   

    我用DATAMODULE里面加了ADOConnection,ADOTable,DataSource,設計時直接改active為true可看到數據﹐但運行是我用if not adotable.active then adoTable.open則報錯
      

  4.   

    我剛剛試了table1.close都出錯﹗
      

  5.   

    procedure TDataSet.Open;
    begin
      Active := True;
    end;
    不是吧,可能是你其他地方设置错了,具体错误是什么啊?
      

  6.   

    錯誤提示如下:
    Project Project1.exe rased exception class EAccessViolation with message 'Access 
    violation at address 004A22BF in module 'Project1.exe'.Read of adderss 0000005cC'.
    Process stopped.Use Step or Run to continue!
      

  7.   

    数据模块没有Creatif not Assigned(数据模块窗体) then
    begin
      数据模块窗体:= T数据模块窗体.Creat(Application);
    end;
      

  8.   

    如果你是用soap的话,就每次要
      CreateDataModule;
      try
      finally
        DestroyDataModule;
      end;