string selectCommand = "select * from o_c_perf_trunkgroup where start_time > to_date( '2006-08-31 08:00:00 ', 'yyyy-mm-dd hh24:mi:ss ') ";
OracleConnection connection;
try
{
String connectionString = iniFile.IniReadValue(netType.ToUpper(), "connString ");
connection = new OracleConnection(connectionString);
connection.Open();
OracleDataAdapter dataAdapter = new OracleDataAdapter(selectCommand, connection);
DataSet ds = new DataSet();
ds.Locale = System.Globalization.CultureInfo.CurrentUICulture;
dataAdapter.Fill(ds);
dataGridView1.AutoGenerateColumns = true;
dataGridView1.DataSource = ds.Tables[0];
}
catch (OracleException ex)
{
MessageBox.Show(ex.ToString());
}
这个地方发生错误 dataAdapter.Fill(ds);
错误提示:OCI-22053错误溢出
原因是因为 SQL中查询某些字段的值精度太高了(小数点后20位)。所以溢出。