|
Thanks for the info.
I traced into my source code, when I call the CRecordset::GetFieldValue method, a database field is supposed to be read into a CString variable. I checked the actual value, it is already 63s (question marks). That means something happened between the database and the MFC dll which converted the text into question marks.
I am 100% sure that I am building and debugging unicode version of my program.
My articles and software tools
|
|
|
|
|
I use the Classes by Carlos Antolini (ADO)
and have no problem storing and reading cyrilic
unicode strings.
|
|
|
|
|
|
Xiangyang Liu wrote:
That means something happened between the database and the MFC dll which converted the text into question marks.
Yes, or perhaps the app that loaded the database from a Unicode source performed an invalid transcode and stored question marks into the db? I recommend querying the db outside your app to find the culprit.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
It turns out the MFC dll (6.0) does not support ODBC unicode data. The unicode string types SQL_C_WCHAR and SQL_C_WVARCHAR cannot be found from the source code.
The ODBC drivers I used may not support unicode either (version 3.5 or higher is required).
I will have to use ADO or .NET.
My articles and software tools
|
|
|
|
|
|
When you see ? it means a Unicode->ANSI conversion was done, but your current ANSI code page did not contain equivalent characters. WideCharToMultiByte() is the underlying API, and it inserts ? for unconvertible characters.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
Four fonts walk into a bar. The bartender says "Hey - get out! We don't want your type in here."
|
|
|
|
|
Thanks, Mike. I read your article about testing unicode programs, it is very helpful.
I suspect this specific problem is in the ODBC driver, it may not support unicode properly or it is misconfigured. I will keep looking tomorrow.
My articles and software tools
|
|
|
|
|
It turns out the MFC dll (6.0) does not support ODBC unicode data. The unicode string types SQL_C_WCHAR and SQL_C_WVARCHAR cannot be found from the source code.
The ODBC drivers I used may not support unicode either (version 3.5 or higher is required).
I will have to use ADO or .NET.
My articles and software tools
|
|
|
|
|
Use the ADO if possible.
We converted from using ODBC to the ADO and it works fine for us - Japanese, Chinese, German, French, Spanish, and English. There may be other languages in use I am not aware, like Russian (Cyrillic text).
Also, I found that the ADO access to the database was much quicker.
|
|
|
|
|
I am trying to Write a Desktop application. I have used alot of char based Program compliers such as Basic, C, Fortran, Pascal, Cobol, Etc...
I am haveing a real tough time understanding the C++ Visual Layout and how it operated with Just writing the code...
Lots of screens and not much information on how or what.
Is there A training Module or is there a step through tutorial. Or maybe even someone that can step me through the basic operation.. Im sure once i grasp the concept and get the Rudementary questions answered I will be off and running...
I am working on a project that reequres me to use this and i need to complete this as quickly with out the cost of cutting corners to complete this project.
Thank you very much.
Rilliams
Rilliams2@cs.com
|
|
|
|
|
Download The PDF[^]
I'll write a suicide note on a hundred dollar bill - Dire Straits
|
|
|
|
|
I have to create an application to manage the appointments, I have to insert, modify, move, delete any appointment.
Where I can find (or buy) a control like the calendar in outlook 2003?
|
|
|
|
|
www.bcgsoft.com does exactly what you want (and more), but it's unfortunatly not free anymore
There is no spoon.
|
|
|
|
|
I would like an MFC code instead then an ocx.
I would like to show it as outlook 2003 in a view.
By means of the MFC wizard intercept the message.
|
|
|
|
|
BCG library is 100% MFC code for MFC applications.
There is no spoon.
|
|
|
|
|
There is a demo downloadable to verify if it fit to me?
|
|
|
|
|
you can get a demo of the library at the following link:
http://www.bcgsoft.com/download.htm
I'm not doing ad or marketing, but this is one of the best MFC library with Stingray Studio.
There is no spoon.
|
|
|
|
|
It should display the calendar with the appointment as in outlook 2003.
I have download the demo but I have not found a demo that shows the calendar as in appointment of outlook 2003
|
|
|
|
|
Hi,
you can find what you seek with the "BCGPOutlookDemo.exe" which is a demo that shows an outlook 2003 interface and "BCGPIEDemo.exe" in the "Time controls" panel.
Best regards.
There is no spoon.
|
|
|
|
|
Isn't CDateMonthPicker or something exactly what you want? It's one of the common controls. Anything more complicated can't be free...
|
|
|
|
|
I would like to use a control implemented with MCF.
It should display the calendar with the appointment as in outlook 2003
|
|
|
|
|
|
I've created a pipe. I wish to read from the pipe only when data is available. What should I use. Can I use an Overlap Structure? Or, maybe a ComWaitEvent? What is generally done when reading pipes. I don't want to create a thread which constantly reads a pipe regradless of the data available. Thanks.
|
|
|
|
|
Yes, you can use overlapped IO, or overlapped IO completion ports, or loop on a sync read in a separate thread that will block while there is no data.
Regardless of the method, you are likely going to want to create thread(s) to read from the pipe if you don't want your main thread to block.
The most robust solution is to use IOCP. IOCP can be used to service overlapped requests for any handle returned by CreateFile or WSASocket/socket.
...cmk
Save the whales - collect the whole set
|
|
|
|