我用Access 和Delphi连接后,就有代码编程,代码如下:
var
        aname,apassword,sqlstr:string;
        a:integer;
begin
    if (length(trim(name_edit.Text)) > 0) or (length(trim(password_edit.Text)) > 0) then
        begin
            aname:=trim(name_edit.Text);
            apassword:=trim(password_edit.Text);
            sqlstr:='select * from 管理者信息 a where (a.用户名称='''+aname+''') and(a.密码='''+apassword+''') ';
            with TQuery.Create(nil) do
            try
            SessionName:=MainWinForm.Table1.SessionName;
            DatabaseName:=MainWinForm.Table1.DatabaseName;
     Close;
            SQL.Clear;
            SQL.Add(sqlstr);
            Open;
            if RecordCount > 0 then
            begin
                First;
                while not Eof do
                begin
                    a:=strtoint(copy(FieldByName('菜单项').AsString,1,1));
MainWinForm.MainMenu1.Items.Items[a].Visible:=true;
                    Next;
                end;
运行时,语法没错误,就是弹出错误提示:'file'菜单项'not found',到底是怎么回事啊?



 
											





 
	    

 
	
