-----Original Message-----
It is happening in the the following methode i have.
The only thing i can think of is that it is happening
during one of the Parse routine's.
How can i define the trap to be better?
It dose not happen all the time just once in a while.
Thanks Ron
protected void GetJudgements()
{
int j = 0;
try
{
// Check test position's 1-5 judgement.
for(int i=4; i<84; i+=20)
{
judgements[j] = int.Parse(dmArray
);
j++;
}
// Check on-line status of test positions 6 and 7
// preform judgement logic accordingly.
if((TestOnline[5]) & (TestOnline[6]))
{
// Check test position 6 judgement.
judgements[5] = (0x0 != int.Parse(dmArray[113],
NumberStyles.HexNumber))? 1 : 0;
// Look at tracking and test flags for no-test condition.
judgements[5] = (dmArray[121].Substring(5,1) == "1" &
dmArray[122].Substring(5,1) == "0")? 2 : 0;
// Check test position 7 judgement
// Look at tracking and test flags for no-test condition.
if(dmArray[121].Substring(6,1) == "1" & dmArray
[122].Substring(6,1) == "0")
{
judgements[6] = 2;
}
else
{
judgements[6] = int.Parse(dmArray[104]);
}
}
else if((TestOnline[5] == true) & (TestOnline[6] ==
false))
{
judgements[5] = int.Parse(dmArray[104]);
}
else if((TestOnline[5] == false) & (TestOnline[6] ==
true))
{
judgements[6] = int.Parse(dmArray[104]);
}
}
catch(Exception e)
{
string errorMessage = "";
errorMessage = "Message: " + e.Message + "\n";
EventLog log = new EventLog();
log.Source = "DataCollectionServer";
log.WriteEntry(errorMessage);
}
}
-----Original Message-----
Ron,
What are you trying to do? Read from a database? This
error indicates that you are trying to read an int, but
the value is outside the range of an integer: -
2,147,483,648 through 2,147,483,647.
Tu-Thach
-----Original Message-----
Hi,
I am trying to find the meaing to the following error.
"Value was either too large or too small for an Int32."
Can someone give me some more information on this error?
Thanks Ron
.
.
.