We help IT Professionals succeed at work.
Get Started

Updating an ADODB recordset with a foreign language string in VB6

Last Modified: 2013-12-20
I am trying to update an old package to handle multiple languages. The package is in VB6. The general code flow reads the excel file and then updates an array of columns. I am having a problem when it comes to actually updating the database.

The code:

the variable fileVal contains a foreign language string (I have verified this at the point of the error) from Excel.

The actual code used to update the record set sets a value in the recordset field held in a column array representing the data in the database.:
If (m_dbColumns(p_colIdx).rsField.type = adVarWChar) Then
m_dbColumns(p_colIdx).rsField.Value = fileVal

Open in new window

The code in this method has a number of if clauses for various types of data.

Using this -- I get the correct data in the DB for English Strings and ????? for foreign character (except some eastern european countries where I loose the accents).

I use the same logic to process and update other non (adVarWChar) columns and those update correctly.

the rsField is of type AdVarWChar. The underlying column is nvarchar2.The character set for nvarchar columns in Oracel is UTF16.

Watch Question
This problem has been solved!
Unlock 1 Answer and 14 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE