language issue with DoCmd.TransferDatabase

  • Thread starter Thread starter Amedee Van Gasse
  • Start date Start date
A

Amedee Van Gasse

Hello,

One of our users reported this error:

DoCmd.TransferDatabase acLink, "ODBC Database",
"ODBC;DSN=DB2;UID=xxxxxxxx;PWD=xxxxxxxxx;DBALIAS=DB2", acTable,
"U.D604_RO", "U_D604_RO", , True

Works OK when the Office language/locale is set to English.
Fails with error "type ODBC Database niet gekend" (type ODBC Database
unknown) when the Office language/locale is set to Dutch.

I'm not familiar with Access so if anyone could please enlighten me it
would be very much appreciated.
 
hi,
yes, localized access version requires localized name for "ODBC Database". I
use the following code to determine, in my case for Russian version:

On Error Resume Next
DoCmd.CopyObject 'generate an error
Select Case left(Err.Description, 1)
Case "Ð’" 'starts with Russian letter
strResult = "Базы данных ODBC"
Case Else
strResult = "ODBC Database"
End Select
Perhaps there is a better way, but this works ok for me

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
 
hi,
yes, localized access version requires localized name for "ODBC Database".. I
use the following code to determine, in my case for Russian version:

š š š š On Error Resume Next
š š š š DoCmd.CopyObject 'generate an error
š š š š Select Case left(Err.Description, 1)
š š š š š š Case "÷" 'starts with Russian letter
š š š š š š š š strResult = "âÁÚÙ ÄÁÎÎÙÈ ODBC"
š š š š š š Case Else
š š š š š š š š strResult = "ODBC Database"
š š š š End Select
Perhaps there is a better way, but this works ok for me

Thanks, but "ODBC Database" in English is also "ODBC Database" in
Dutch.
So I think there is a different problem.

By the way, I like your style. Intentionally throwing an error to find
out the language. Kung-fu code :-)
 
hi,
then check ODBC connection string, perhaps it differs in Dutch environment

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com

hi,
yes, localized access version requires localized name for "ODBC Database".
I
use the following code to determine, in my case for Russian version:

On Error Resume Next
DoCmd.CopyObject 'generate an error
Select Case left(Err.Description, 1)
Case "÷" 'starts with Russian letter
strResult = "âÁÚÙ ÄÁÎÎÙÈ ODBC"
Case Else
strResult = "ODBC Database"
End Select
Perhaps there is a better way, but this works ok for me

Thanks, but "ODBC Database" in English is also "ODBC Database" in
Dutch.
So I think there is a different problem.

By the way, I like your style. Intentionally throwing an error to find
out the language. Kung-fu code :-)
 
Back
Top