Beispiel #1
0
int dbDatabase::PutRecord(const String &tbname, int recno, dbRecord& Record, bool f) {
  int h;

#ifdef _WITH_DEBUG
RLOG("Put record: " + FormatInt(recno));
RLOG("Table: " + tbname);
#endif
  if((h = GetTableHandle(tbname)) == MTDB_TB_NOT_FOUND)
  	return MTDB_TB_NOT_FOUND;

	return PutRecord(h, recno, Record, f);
}
Beispiel #2
0
// set value, call ValueChanged() afterwards!
bool wxDBase::SetValueByRow(const wxVariant& var, unsigned int row, unsigned int col)
{
   bool ok = true;

   if (ok) ok = SetPosition(row);
   if (var.IsType(wxT("datetime")))
   {
      ok = Write(col, var.GetDateTime());
   }
   else
   {
      ok = Write(col, var.MakeString());
   }
   if (ok)
   {
      ok = PutRecord(row);
   }
   return ok;
}