I have been working on an old VB6/Oracle app to add support for additional languages. I got the on screen controls to work and can display the contents of the Database OK on the screen. Now I am looking at importing data with some columns in Cyrillic.
I can read the excel files, I see the Unicode string in the Excel Worksheet variable in the IDE. The way the code is organized it copies the string into a an array m_fileRows. I can see the unicode string there as well with the correct values. We then set the value in another array called m_dbColumns. So now the code looks like this:
Dim fileVal as variant
fileVal = m_fileRows((p_fileRowIdx).data(fileCol)
if (m_dbColumns(p_colIdx).dataType = adVarWChar) then
' Here I want to set the value of the recordset field for this column.
m_dbColumns(p_colIdx).rsField.Value = ?????
When I look at fileVal in the IDE it is a Variant/Byte with the correct byte sequence for the Cyrillic character I have in the Excel worksheet.
After I set all the columns I will then update the recordset to write it back to the database.
I cannot figure out what to put in place of the ??????
I know that the Columns rsField is correctly set to an AdVarWChar type (then mapped to an nvarchar in Oracle).
I know that the Oracle connection is working for reads at least as I am able to read and display the Oracle unicode string correctly.
Any help would be appreciated.