15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


UNICODE app and CRecorset

Ronen Ashkenazi -- rashken@ms-israel.kla.com
Tuesday, September 17, 1996


Enviroment: X86, NT 3.51, VC 4.1

Hi,

 I have an extension DLL in my application that handles communications   
with the database through ODBC (CRecordset). I now added UNICODE support   
to my app, and added the _T macro to all the strings. I also changed any   
string buffers I had that were not CString to _TCHAR.
 The code that does not handle the database works fine. I started running   
into problems when I am trying to connect to the database.
 I first set the m_strSort CString. When I look at the string through the   
debugger, I see only the first character of the string. I tried to   
display the string on the screen using AfxMessageBox and the string looks   
OK ??#%!
 Next when I open the CRecordset with the Open method the Open command   
finishes fine. But when I execute the IsBOF command I fall in Debug   
assertion. After investigating the problem I found that the assertion is   
on IsOpen(). Apparently the set is not opened as I thought.
 I am confused!  Any ideas ?

Thanks,
Ronen.



JLangseth1@aol.com
Thursday, September 19, 1996

I cannot help with the database operation, but to see UNICODE strings in the
debugger you can:

Add ",su" to a CString variable name in the Watch window - eg mystring,su

Modify the file \msdev\bin\autoexp.dat - last line (DisplayUnicode=1).  This
causes the Local Variable list to display the full UNICODE string.

HTH




| Вернуться в корень Архива |