Error when executing select with alias

Asked

Viewed 43 times

0

When executing the query below using "AT" in place of "T" as alias of Join is returned the following error: "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 someone like to tell me why?

  • possibly AT is a query command, if you want to use as an alias put in quotes and do a test: " INNER JOIN tblAlcadaTipo \"AT\" "

  • Same mistake.....

  • Tried with simple quotes?

  • Yes, single and double with bar.

1 answer

1


Browser other questions tagged

You are not signed in. Login or sign up in order to post.