PavelGur
Programmer
- Sep 21, 2001
- 75
I'm getting exception claiming that I put (null) in numeric field though it is not true. Here is the code and the messages:
Here is the table layout in header file:
CString m_Stock;
CTime m_Date;
float m_fAsk;
float m_fBid;
int m_iAskSize;
int m_iBidSize;
try
{
pAB->AddNew();
pAB->m_Stock = szStock;
pAB->m_Date = CTime::GetCurrentTime();
pAB->m_fAsk = fAsk;
pAB->m_iAskSize = iAskSize;
pAB->m_fBid = fBid;
pAB->m_iBidSize = iBidSize;
TRACE("Stock %s, fAsk %f, fBid %f, iAskSize %d, iBidSize %d \n", szStock, pAB->m_fAsk,pAB->m_fBid, pAB->m_iAskSize, pAB->m_iBidSize);
pAB->Update();
}
catch(CDBException* e)
{
CString szFunction("pAB->AddNew/Update");
HandleError(e, szFunction, szStock);;
}
here is TRACE and exception message:
Stock CIEN, fAsk 3.800000, fBid 3.790000, iAskSize 33700, iBidSize 34200
Numeric value out of range (null)
State:22003,Native:34,Origin:[Microsoft][ODBC Microsoft Access Driver]
First-chance exception in CTDataFeed2.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.
First-chance exception in CTDataFeed2.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.
First-chance exception in CTDataFeed2.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.
Does anybody has an explanation?
Thanks, Pavel.
Here is the table layout in header file:
CString m_Stock;
CTime m_Date;
float m_fAsk;
float m_fBid;
int m_iAskSize;
int m_iBidSize;
try
{
pAB->AddNew();
pAB->m_Stock = szStock;
pAB->m_Date = CTime::GetCurrentTime();
pAB->m_fAsk = fAsk;
pAB->m_iAskSize = iAskSize;
pAB->m_fBid = fBid;
pAB->m_iBidSize = iBidSize;
TRACE("Stock %s, fAsk %f, fBid %f, iAskSize %d, iBidSize %d \n", szStock, pAB->m_fAsk,pAB->m_fBid, pAB->m_iAskSize, pAB->m_iBidSize);
pAB->Update();
}
catch(CDBException* e)
{
CString szFunction("pAB->AddNew/Update");
HandleError(e, szFunction, szStock);;
}
here is TRACE and exception message:
Stock CIEN, fAsk 3.800000, fBid 3.790000, iAskSize 33700, iBidSize 34200
Numeric value out of range (null)
State:22003,Native:34,Origin:[Microsoft][ODBC Microsoft Access Driver]
First-chance exception in CTDataFeed2.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.
First-chance exception in CTDataFeed2.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.
First-chance exception in CTDataFeed2.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.
Does anybody has an explanation?
Thanks, Pavel.