Bool cfileconfigure: loadsqliteconfig (const cstring & szfield, cfieldex * pfield) {uses_conversion; cstring szpath, szsql; szpath. format (_ T ("% s \ stat \ normal_conf.data"), capplication: configdir (); sqlite3 * PDB = NULL; sqlite3_stmt * pstmt = NULL; auto mbcstoutf8 = [] (const char * file)-> char * {wchar * pwchar = 0; char * pchar = 0; int Len = 0; int codePage = arefileapisansi ()? Cp_acp: cp_oemcp; Len = multibytetowidechar (codePage, 0, file,-1, null, 0); pwchar = new wchar [Len]; Assert (pwchar); If (pwchar! = 0) {Len = multibytetowidechar (codePage, 0, file,-1, pwchar, Len); If (Len! = 0) {Len = widechartomultibyte (cp_utf8, 0, pwchar,-1, 0, 0, 0, 0); pchar = new char [Len]; Assert (pchar ); if (pchar! = 0) {Len = widechartomultibyte (cp_utf8, 0, pwchar,-1, pchar, Len, 0, 0); If (Len! = 0) {Delete pwchar; return pchar ;}} Delete pwchar ;}return pchar ;}; // The Chinese path supports char * ppath = mbcstoutf8 (ct2ca (szpath )); if (sqlite3_open (ppath, & PDB )! = Sqlite_ OK) {Delete [] ppath; return false;} Delete [] ppath; szsql. format (_ T ("Select name, caption, \" Type \ ", formula, formulaname, formulaparam, drill, Lua from indexconfig where upper (name) = upper ('% s') "), szfield); int rc = sqlite3_prepare (PDB, ct2ca (szsql),-1, & pstmt, null ); rc = sqlite3_step (pstmt); If (rc = sqlite_row) {stformula * pformula = new stformula (); pformula-> szcaption = (tchar *) sqli Te3_column_text16 (pstmt, 1); pformula-> utype = sqlite3_column_int (pstmt, 2); pformula-> ulength = sqlite3_column_int (pstmt, 2) = 3? 64: 8; pformula-> uformulatype = sqlite3_column_int (pstmt, 3); pformula-> szformulaname = (tchar *) sqlite3_column_text16 (pstmt, 4 ); pformula-> szformulaparam = (tchar *) sqlite3_column_text16 (pstmt, 5); pformula-> szformulalua = (tchar *) sqlite3_column_text16 (pstmt, 7 ); pformula-> benabledrill = pfield-> icolflag & cfdelay? True: Average (pstmt, 6); pformula-> bisdim = pfield-> icolflag & cfdimension; m_vecindextrans [String (ct2ca (szfield)] = pformula;} average (pstmt ); sqlite3_close (PDB); Return rc = sqlite_row ;}