글
4월, 2020의 게시물 표시
1292:Incorrect datetime value: '' for column '$dateTime' in libmysqlclient
- 공유 링크 만들기
- X
- 이메일
- 기타 앱
'1292:Incorrect datetime value: '' for column '$dateTime' in libmysqlclient' C++ library mysqlClient에서 위 오류가 난다면 점검해볼사항은 2가지 1. Value에 대해 제대로 값이 셋팅 되었나? 2. MYSQL_TIME에 대해 값이 제대로 셋팅되었나? 위 두가지 점검해보면됨 // 데이터 초기화 MYSQL_TIME ts; ts.year = (unsigned int)0; ts.month = (unsigned int)0; ts.day = (unsigned int)0; ts.hour = (unsigned int)0; ts.minute = (unsigned int)0; ts.second = (unsigned int)0; ts.second_part = (unsigned long)0; // ms ts.neg = (my_bool)false; // -값 사용여부 ts.time_type = MYSQL_TIMESTAMP_DATETIME; // 값 셋팅 ts.year = (unsigned int)time.year(); ts.month = (unsigned int)time.month(); ts.day = (unsigned int)time.day(); ts.hour = (unsigned int)time.hour(); ts.minute = (unsigned in...