Error executing select with alias

0

When executing the query below using AT instead of "T" as a join alias, the following error is returned: "IErrorInfo.GetDescription failed with E_FAIL (0x80004005). "

OleDbDataAdapter da = new OleDbDataAdapter("SELECT A.*, " +
                                                 " T.alcadaTipo as alcadaTipoDescricao " +
                                            " FROM tblAlcada A " +
                                           " INNER JOIN tblAlcadaTipo T " +
                                              " ON T.alcadaTipoId = A.alcadaTipo", conn);

Would anyone please explain why?

    
asked by anonymous 04.10.2017 / 23:08

1 answer

1

AT is part of the reserved words of the access engine. You can try to put it between quotes: ' AT '

Access reserved word list: link

    
05.10.2017 / 01:38