Error ORA-00942 TABLE DOES not EXIST occurring in System.Date.OracleClient. VB.NET

I have an application in vb.net using .NET Framework 2.0 .

Below is a snippet of my application code:

strComando = "SELECT CD_LOCALIDADE, NO_LOCALIDADE FROM COPAGIS_GDB.MUB_LOCALIDADES WHERE FL_IMPLANTADO='S' ORDER BY NO_LOCALIDADE"
fsOarquivo.WriteLine(strComando)
pComando = _controleAcessoDados.ProxyBD.MontarComando(strComando)
fsOarquivo.WriteLine(pComando.CommandText)
dataAdapter = New OracleDataAdapter(pComando)
fsOarquivo.WriteLine(dataAdapter.SelectCommand.CommandText)
dataAdapter.Fill(tblTabelas)
fsOarquivo.WriteLine(tblTabelas)

Running this snippet of code produces the error

ORA-00942: Table or view does not exist

In command

dataAdapter.Fill(tblTabelas)

I used sqlnet to generate a trace to show what the oracle client is getting from the application. Follow the trace excerpt below.

sqlnet trace image

Note in the attached sqlnet trace image that the SQL code is modified in the trace file. The number '5' was included in the table name.

Can anyone tell me why this is happening? I'm using System.Data.OracleClient from Microsoft.

 0
Author: Leonel Sanches da Silva, 2014-03-13

1 answers

Also see if the user who logged into the database is the owner of the table, not being and not wanting to change change the select to something of type

select * from owner.tabela

Also see if the login user has the SLECT GRANT of this table / view.

 1
Author: Motta, 2018-12-24 05:09:40