PavelGur
Programmer
- Sep 21, 2001
- 75
I'm getting data from brokerage company that's supposed to be numeric. But actually it is not. I try to put it in the table and getting MS exception:
I am getting "Numeric value out of range (null)". I have no idea which field is NULL. I need to inform broker.
All fields are either float or integer. I know there are functions to check whether string or character data is numeric. I did not find so far the function that will tell me whether numeric field is numeric. Any ideas?
Thank you, Pavel.
Code:
try
{
pPRC->AddNew();
pPRC->m_Stock = szStock;
pPRC->m_Date = CTime::GetCurrentTime();
pPRC->m_DayNum = iDayTrades;
pPRC->m_Price = fPrice;
pPRC->m_iTradeSize = iTradeSize;
pPRC->m_lVolume = lVolume;
pPRC->Update();
}
catch(CDBException* e)
{
TRACE("Error %s for stock %s\n", e->m_strError, szStock);
HandleError(e->m_strError,
e-strStateNativeOrigin,
"UpdateTables pPRC->AddNew/Update", szStock);
goto ClosePrice;
}
All fields are either float or integer. I know there are functions to check whether string or character data is numeric. I did not find so far the function that will tell me whether numeric field is numeric. Any ideas?
Thank you, Pavel.