Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems using English mdb in French environment 1

Status
Not open for further replies.

RichardHayes

Programmer
May 1, 2002
28
0
0
GB
I am using docmd.transfer database, and it works fine.

However when I release the application in a French environment, I get the following error :

Erreur d'execution 2507
Le type de base de donnees ODBC database n'est pas installe ou ne gere pas l'operation selectionnee

...which I believe is the equivalent of ...

Error 2507
The Microsoft Access type isn't an installed database type

As I say, the code works fine in an English environement, but refuses to work in French.

Any ideas?
 
I think the keyword in that text is ODBC.

Sounds like an ODBC driver may not be installed.
 
As I say, it works fine with in English, so ODBC is definitely installed. It's only when I change the windows language in the control panel to French that I get this error.
 
The error message translates as:

The type of database ODBC is not installed or does not handle the selected operation

It might help if you posted the whole of the docmd.transfer line so that we can see what parameters you are trying to use.
 
Thanks for your help cheerio.

It's in a function that attachs a SQL server table, based on parameters. The command is as follows.

DoCmd.TransferDatabase acLink, "ODBC Database", "ODBC;DSN=ReportRepositoryDC02;DATABASE=" & sDB, acServerView, sSourceTable, sTable
 
What happens if you try to build the command in the macro window while running under french Windows - does it offer "ODBC Database" or a french equivalent?

One interpretation of the error message is that "ODBC Database" is not being recognied as a valid french term - perhaps it wants something more like "base de donnees ODBC" which is the literal translation.

If that is the problem you are going to need to vary the command according to the locale.
 
The ODBC bit is in quotes, so Access doesn't offer any options, but this is the same as in English. I've looked in the French help files, and it offers an example that is almost identical to mine bar the DSN and database name, using ODBC. It still gives the same error though.
 
Hey I've fixed it!! I just deleted the word database, so it now reads :

DoCmd.TransferDatabase acLink, "ODBC", "ODBC;DSN=ReportRepositoryDC02;DATABASE=" & sDB, acServerView, sSourceTable, sTable

...and works in English and French.

Thanks for your help.
 
Hey, RichardHayes!

I'm currently working on a DB that will be installed on French computers.

My question to you is, will vbYesNo show up as "Oui" and "Non"?

Also, did you have any other problems in the language-transfer?
 
If you use vbYesNo as buttons for a message box, the box will be in French yes.

I haven't encountered any other problems to date!
 
Ah, yes! Fantastic! A star for you, good sir, a star for you.
 
Richard

Great news about the ODBC connection - particularly that there is a solution that is language independent.

Grande

The main issue is that currency is formatted with a comma separating Euros and cents rather than a stop and you need to be careful with dates (eg days and months have different names).

Generally use functions that understand locale when interacting with the user interface. For example the vba str function always turns a number into a string using a stop but the cstr function turns a number into a string using the local separator.

vba itself always operates in American so constants like vbYesNo stay that way. However, those constants are just magic numbers (vbYesNo has a value of 4) and it's the number that controls the action.
 
Thanks a lot, Cheerio!

I don't even have to worry about the comma/stop difference as (to the best of my knowledge), we use the $5.99 format throughout Canada, even in Quebec. And dates aren't a problem because they're all going to be in the DD-MM-YYYY format (ie, number, not letters).

Another question, what's the difference between str() and cstr()? Or Ucase() and Ucase$()?
 
And dates aren't a problem because they're all going to be in the DD-MM-YYYY format (ie, number, not letters)." ???

Are you using Date/Time as field format, or number?

Try the following experiement (for a date/time field):

[tt]dim dt as date
dim sSql as string
dt=dateserial(year(now), month(now),8)
debug.print dt
sSql = "insert into sometable (yourdate) values (#" & dt & "#)"
currentdb.execute sSql[/tt]

Enter the immediate pane (ctrl+g), which date is displayed?
Enter the table, what is the date? Feb 8 or Aug 2?

For str/cstr - type the function names in VBE, hit F1 while the cursor is within them. For functions with or without $, try the help topic "Returning Strings from Functions"

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top