TEXT TO qTxt NOSHOW TEXTMERGE insert into serno_method_sequence ( idmethodsheet_sequence, idserialno, idmethodsheet, date_started, idrework, rework_date, defect, action_taken, rework_fix ) values (<<c_methodsheet_sequence.idmethodsheet_sequence>>, <<ocfg.nIDSerialno>>, <<ocfg.nmethodsheet>>, '<<TTOC(DATETIME())>>', <<IIF(thisform.ilRework, curRework.idserno_method_sequence, 0)>>, '<<IIF(thisform.ilRework, DTOC(DATE()), "")>>', '', '', '') ENDTEXT TEXT TO qTxt2 NOSHOW TEXTMERGE Select LAST_INSERT_ID() as newid ENDTEXT nHndl = thisform.nConnHandle IF nHndl <1 nHndl = ConnOnly() ENDIF cErrMsg =GetSQL(nHndl,QTxt) IF !EMPTY(cErrMsg) =MESSAGEBOX(cErrMsg, 16, "Connection Problem") RETURN .T. ENDIF cErrMsg =GetSQL(nHndl,QTxt2, 'curGetSNID') IF !EMPTY(cErrMsg) =MESSAGEBOX(cErrMsg, 16, "Connection Problem") RETURN .T. ENDIF DO case CASE RECCOUNT('curGetSNID') = 0 nID = 0 CASE TYPE('curGetSNID.newid') = 'N' nID = curGetSNID.newid OTHERWISE nID = VAL(curGetSNID.newid) ENDCASE IF USED('curGetSNID') USE IN curGetSNID ENDIF RETURN nIDBack in February we suddenly started experience mixed values in the results. For FEB 10, for example, we got 5098 records where the character field ("date_started") was of the expected form
02/10/2015 07:08:59But we also got 2145 records where the result took the unexpected form of
20150210070743which is the right value but the wrong format.