用ADO连接数据库不用那么麻烦吧?放一个TADOConnection,然后编辑connectionstring属性不就行了?按这个属性旁边的省略号可以进入一对话框,其实就是connectionstring构造向导,自己试试吧,很简单的。

解决方案 »

  1.   

    pri_ADOConnection1:=TADOConnection.Create(Self);
    试试。
    TComponent.Create好像需要它。
    constructor TComponent.Create(AOwner: TComponent);
    begin
      FComponentStyle := [csInheritable];
      if AOwner <> nil then AOwner.InsertComponent(Self);
    end;
      

  2.   

    ConnectionString属性设对了就没问题,我用过。
    把你ConnectionString属性贴上看看。
      

  3.   

    同意saoren的说法,的确象是Create(Self)的问题。