I
infmpv00
Someone can help me to solve this problem in my code?¿
This is the code:
private static DataSet executeQuery(string strConnectionString, string
strQuery)
{
try
{
DataSet dsResult = new DataSet();
OleDbConnection conn = new OleDbConnection(strConnectionString);
OleDbDataAdapter adapter = new OleDbDataAdapter();
adapter.SelectCommand = new OleDbCommand(strQuery, conn);
adapter.Fill(dsResult);
return dsResult;
}
catch (Exception e)
{
Debug.WriteLine(e.Message);
return null;
}
}
This is the exception that I obtain when fill the datase:
[InvalidCastException: The data value could not be converted for
reasons
other than sign mismatch or data overflow. For example, the data was
corrupted in the data store but the row was still retrievable.]
Thanks
This is the code:
private static DataSet executeQuery(string strConnectionString, string
strQuery)
{
try
{
DataSet dsResult = new DataSet();
OleDbConnection conn = new OleDbConnection(strConnectionString);
OleDbDataAdapter adapter = new OleDbDataAdapter();
adapter.SelectCommand = new OleDbCommand(strQuery, conn);
adapter.Fill(dsResult);
return dsResult;
}
catch (Exception e)
{
Debug.WriteLine(e.Message);
return null;
}
}
This is the exception that I obtain when fill the datase:
[InvalidCastException: The data value could not be converted for
reasons
other than sign mismatch or data overflow. For example, the data was
corrupted in the data store but the row was still retrievable.]
Thanks