When MFC mysql writes the path to the database, the slash disappears

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

Guess you like

Origin blog.csdn.net/u012719076/article/details/134671952