Edit a record in a DB table opened with ODBC
-
Itr to edit a record of a table which it has fields of type float. When these fields have decimals the update cannot be done. But when they are without decimals the update is successful. Does anyone know how can I update the record even if it has fields with decimals? Thanks in Advance
-
Itr to edit a record of a table which it has fields of type float. When these fields have decimals the update cannot be done. But when they are without decimals the update is successful. Does anyone know how can I update the record even if it has fields with decimals? Thanks in Advance
Without seeing a relevant code snippet, it's hard to say what you are doing wrong.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
-
Without seeing a relevant code snippet, it's hard to say what you are doing wrong.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
double value=15.1 TableSet->Open(); TableSet->MoveFirst(); while(!TableSet->IsEOF()) { if(TableSet->m_field1 == id) { TableSet->Edit(); TableSet->m_field2 += value; TableSet->Update(); } else { TableSet->MoveNext(); } } When TableSet->m_field2, which is of type float, has decimals the update return error. When it does not have decimals no error occurs. Any idea?
-
double value=15.1 TableSet->Open(); TableSet->MoveFirst(); while(!TableSet->IsEOF()) { if(TableSet->m_field1 == id) { TableSet->Edit(); TableSet->m_field2 += value; TableSet->Update(); } else { TableSet->MoveNext(); } } When TableSet->m_field2, which is of type float, has decimals the update return error. When it does not have decimals no error occurs. Any idea?
sirtimid wrote: ...the update return error. And what would that error be? What does the
DoFieldExchange()
method look like for theCRecordset
-derived class? Is the corresponding field in the database table a floating-point type?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb