I”m trying to select data from oracle database and show it in DataGridView. But it fails. It says Arithmetic operation resulted in an overflow. I’m not using any math operations so where this error can be?
Code snipped:
public MainForm()
{
InitializeComponent();
try
{
con = new OracleConnection(conStr);
con.Open();
query = "select * from CHECKINFO";
da = new OracleDataAdapter();
da.SelectCommand = new OracleCommand(query, con);
dt = new DataTable();
da.Fill(dt); // error occures here
dataGridView1.DataSource = dt;
con.Close();
}
catch (OracleException ex)
{
MessageBox.Show(ex.Message);
}
}

Try this,
In properties of your application project, the one with your Main method, set platform target from AnyCPU to X86. Hope it helps. And be sure that this configuration is used in Build -> ConfigurationManager.