刚接触不久,照书写了一段代码有关ADO连接数据库问题,编译没通过,请帮懂的人帮看看,谢谢  procedure TForm1.BitOpenClick(Sender: TObject);
 const
    ConnStr = 'Provider=s%;DataProvider=s%;Datasource=s%';//定义书写格式
  begin
    //ADoconnection1 没有连接的时候建立数据库连接
   if not ADOConnectionl.Connected  then
    ADOConnectionl.ConnectionString:=format(connstr,[provider.text,
      DataProvider.Text,edtDataSource.text]);
   Try //打开连接
    ADOConnectionl.open();
  except
    Exception.Create(ConopenAdoError); //ConopenAdoError实现定义好的常量出错显示 end;end.编译错误如下:[Error] Unit1.pas(62): Undeclared identifier: 'ADOConnectionl' 
--->不太明白,在表单里已经有 ADOConnection1: TADOConnection;  以下更加看不懂                                     [Error] Unit1.pas(62): 'THEN' expected but identifier 'Connected' found
[Error] Unit1.pas(66): Missing operator or semicolon
[Error] Unit1.pas(68): Undeclared identifier: 'ConopenAdoError'
[Error] Unit1.pas(72): ';' expected but '.' found
[Error] Unit1.pas(74): Declaration expected but end of file found
[Error] Unit1.pas(42): Unsatisfied forward or external declaration: 'TForm1.BitBrowserClick'
[Error] Unit1.pas(43): Unsatisfied forward or external declaration: 'TForm1.BitSaveFileClick'
[Fatal Error] Project2.dpr(5): Could not compile used unit 'Unit1.pas' 

解决方案 »

  1.   

    procedure TForm1.BitOpenClick(Sender: TObject);
     const
        ConnStr = 'Provider=s%;DataProvider=s%;Datasource=s%';//定义书写格式
    begin
        //ADoconnection1 没有连接的时候建立数据库连接
       if not ADOConnectionl.Connected  then
        ADOConnectionl.ConnectionString:=format(connstr,[provider.text,
          DataProvider.Text,edtDataSource.text]);
       Try //打开连接
        ADOConnectionl.open();
      except
        Exception.Create(ConopenAdoError); //ConopenAdoError实现定义好的常量出错显示
      end;  //至少此处少了个end;
     end;
      

  2.   

    还要从面板中拉一个TBitBtn按钮到窗体上,然后命名为BitOpen,然后双击这个按钮,然后用上门的代码替换。
      

  3.   

    1.你好像有一些帖子没结. 
    2.是ADOConnection1而不是ADOConnectionl,1 <>L