0
I have an application in Vb.net using .Net Framework 2.0.
Below is an excerpt from 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)
The execution of this part of the code produces the error
ORA-00942: Table or view does not exist
in charge
dataAdapter.Fill(tblTabelas)
I used sqlnet to generate a trace to show what the oracle client is receiving from the application. Follow the trace snippet below.
Note in the attached sqlnet trace image that the SQL code is modified in the trace file. The number '5' has been included in the table name.
Can anyone tell me why this is happening? I’m using System.Data.OracleClient
microsoft.
Do two checks: First Is there really a Table? Second, check pWith if the string was not changed before entering Oracledataadapter... I don’t think it is the Adapter that is changing your query... it may be likely that the Montarcomando is doing this, but just check to be sure
– Tafarel Chicotti
Thanks for the return.
– Mardemb
Thanks for the feedback. I already did this conference. I attached an image of the trace file produced by SQLNET where it shows the modified SQL command.
– Mardemb
Another interesting fact related to this problem. Its running the application from within the visual studio works without error. Your run out of visual studio error occurs.
– Mardemb
You are running out of vs in the same machine and environment, or different machine/environments?
– Tafarel Chicotti
On the same machine.
– Mardemb