Hi, I'm learning-on-the-go as I develop a database application for a small business. I'm running into a lot of trouble reading numerical and date data from a dBase III file using the Borland Database Engine and IDAPI.
The function was returning wierd values, so as an error-check I encoded then immediately decoded a date. What I get back is not what I put in.
DbiDateEncode (2, 29, 80, &dte);
DbiDateDecode (dte, (pUINT16)&mm, (pUINT16)&dd, (pINT16)&yy);
sprintf (str, "%i/%i/%i", mm, dd, yy);
MessageBox (hDlg, str, "", MB_OK);
Theoretically, the messagebox should display "2/29/80" but it actually displays something like "901286/13/3248237"