The issue with your application was that your void convertDataFormat (char *dateStr) function was not working properly. The resulting string after this function was run was not correct in Release mode, and it also appeared that the function was running off the end of the char[] array and corrupting data used by other variables. I replaced your function with the one below and the application works as expected in Debug and Release mode.
It will be easier to find problems such as this if you include more error checking in your code. I would suggest looking at the following example program, and implementing similar error checking.
Example Program: LabWindows/CVI SQL Toolkit with MS Access 97void convertDataFormat (char *dateStr)
{
char timeDate[11];
timeDate[0] = dateStr[6];
timeDate[1] = dateStr[7];
timeDate[2] = dateStr[8];
timeDate[3] = dateStr[9];
timeDate[4] = '-';
timeDate[5] = dateStr[0];
timeDate[6] = dateStr[1];
timeDate[7] = '-';
timeDate[8] = dateStr[3];
timeDate[9] = dateStr[4];
timeDate[10] = '\0';
strcpy(dateStr, timeDate);
}