When writing, it is found that the path in the database is:
E:wokspacePROJECTThirdTrailInspectioncode_cttrmeasureBSVbinimage_guidipzjt-20231113145420_下行mdx-1-5_li339.44_1.jpg
Because of the existence of escape characters,
Solution:
MFC replaces \\ before converting CString to string.
strSql.Replace(L"\\", L"//");
Solve the problem of missing slashes or backslashes in mysql save path-CSDN Blog