OracleDataAdapter.Fill causes exception on some workstations but not others
433075Jan 18 2006 — edited Jan 19 2006We have a group of PCs that have an application with the below code. The code works on most workstations but throws an exception on others. There is nothing fancy about the code or the application and of course the application works flawlessly if we run it in the .Net IDE debugger. We are using Oracle 9i and ODP.NET 9.2.0.4. The same users who experience the issues can log onto other pcs and successfully run the application, so we do not think it has anything to do with db permissions.
Anyone seen anything like this or have any ideas? Thanks for the help.
CODE
DataTable dt = new DataTable();
OracleDataAdapter adapter = new OracleDataAdapter();
adapter.SelectCommand = new OracleCommand("SELECT * FROM MYTABLE", conn);
adapter.Fill(dt);
The exception information is:
"Object Reference not set to an instance of an object"
Stack Trace
at Oracle.DataAccess.Client.OracleDataAdapter.Fill(DataTable dataTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at MyApp.MyNamespace.SelectMyData()