Home > Software engineering >  In ole db CColumnsInfo problem?
In ole db CColumnsInfo problem?

Time:09-25

In ole db, obtain the table structure information
 m_pColumnset=new CColumns; 
Retrieves the hr=m_pColumnset - & gt; Open (m_session, NULL, NULL, lpszName);

While (pDoc - & gt; M_pColumnset - & gt; MoveNext ()==S_OK)
{
Cstrings strValue;

//always insert the column name
strValue=https://bbs.csdn.net/topics/pDoc-> m_pColumnset -> m_szColumnName;
}


In this m_pColumnset - & gt; M_szColumnName, if a table field is the Chinese will not be able to get normal, it is defined as TCHAR, but not in practice, Microsoft's own example is the problem, compile the sample for unicode also not solve, have what way to no

CodePudding user response:

To see the database Settings,
UNICODE doesn't work, try the UTF8

CodePudding user response:

What is defined in your database code format?

CodePudding user response:

Back upstairs two:
Is the access database, the database contents can be read properly, the problem is to read the table fields, is something wrong with the name of the column, if it is in Chinese, turned out to be?? , es is no problem,
And I find the access there doesn't seem to be table or fields name encoding Settings,

CodePudding user response:

Use support Unicode odbc, ado,...

CodePudding user response:

Didn't you?" Use support Unicode odbc, ado,... "? Unicode is not implemented by modifying engineering properties? According to you to say so the oledb is waste?

CodePudding user response:

reference 5 floor tiegerium reply:
no?" Use support Unicode odbc, ado,... "? Unicode is not implemented by modifying engineering properties? According to you to say so the oledb is waste?

ANSI and Unicode odbc, ado underlying DLL points two versions, I think,
  • Related