M
mirin
Hello,
Using VBA, I am running a query on a Sybase database and displaying
the results in an Excel sheet. I am using MS ADO 2.1 library. The
problem is that some fields which are in Japanese are being displayed
as junk. My PC does have Japanese language
support installed and I can read and write Japanese text in an Excel
sheet. But the Japanese part of the data returned from the Sybase
database displays as
junk. The database owners say the charset is 'EUC' code.
How can I set my results in Excel to be of charset 'EUC' for this
query?
Here's my VBA code:
'***
Dim connDB As ADODB.Connection
Dim rstDB As ADODB.Recordset
Set connDB = New ADODB.Connection
connDB.Open "Provider=MSDASQL.1;Extended
Properties=ODBC;DATABASE=database1;UID=user1;PWD=pswd1;DSN=DSN1;"
strSQL = "SELECT * FROM tbl1"
Set rstDB = New ADODB.Recordset
rstDB.Open strSQL, connDB, adOpenForwardOnly, adLockReadOnly
Sheet1.Range("A2").CopyFromRecordset rstDB
'***
Many Thanks,
Mirin
Using VBA, I am running a query on a Sybase database and displaying
the results in an Excel sheet. I am using MS ADO 2.1 library. The
problem is that some fields which are in Japanese are being displayed
as junk. My PC does have Japanese language
support installed and I can read and write Japanese text in an Excel
sheet. But the Japanese part of the data returned from the Sybase
database displays as
junk. The database owners say the charset is 'EUC' code.
How can I set my results in Excel to be of charset 'EUC' for this
query?
Here's my VBA code:
'***
Dim connDB As ADODB.Connection
Dim rstDB As ADODB.Recordset
Set connDB = New ADODB.Connection
connDB.Open "Provider=MSDASQL.1;Extended
Properties=ODBC;DATABASE=database1;UID=user1;PWD=pswd1;DSN=DSN1;"
strSQL = "SELECT * FROM tbl1"
Set rstDB = New ADODB.Recordset
rstDB.Open strSQL, connDB, adOpenForwardOnly, adLockReadOnly
Sheet1.Range("A2").CopyFromRecordset rstDB
'***
Many Thanks,
Mirin