ODBC problem with Access, non-English Windows XP

  • Thread starter Thread starter kramer.newsreader
  • Start date Start date
K

kramer.newsreader

Hi. I have a program that makes an ODBC connection with an MS Access
database. When Windows' system language is set to anything other then
English I get an error.

This program reads a bunch of values from the database, does some
computation, and then writes results back to the database. The reads
seem to work okay, but at the end when it is trying to write to the DB,
I get this error:

SQL Error State:21S01, Native Error Code: FFFFF240, ODBC Error:
[Microsoft][ODBC Access Driver] Number of query values and destination.
Number of query values and destination fields are not the same.

I never get this error when the system is set to English, but any other
language produces that error. The language of the access driver
seemsto make no difference.

Any help would be appreciated.
 
(e-mail address removed) wrote in message
Hi. I have a program that makes an ODBC connection with an MS Access
database. When Windows' system language is set to anything other
then English I get an error.

This program reads a bunch of values from the database, does some
computation, and then writes results back to the database. The reads
seem to work okay, but at the end when it is trying to write to the
DB, I get this error:

SQL Error State:21S01, Native Error Code: FFFFF240, ODBC Error:
[Microsoft][ODBC Access Driver] Number of query values and
destination. Number of query values and destination fields are not
the same.

I never get this error when the system is set to English, but any
other language produces that error. The language of the access
driver seemsto make no difference.

Any help would be appreciated.

One guess - some of the data you update/append to the db, is numeric,
containing decimals, and you do this update through dynamic sql?

If I'm correct, then in countries using comma as decimalseparator
123.42 becomes 123,42 when concatenated into a string, which the Jet
engine interprets as values for two fielsd, not one.

In VB(A) one could either use the replace function

sSql = "somefield = " & replace(sngMyNum, ",", ".") & _

or use methods utilizing the paremeters collection of the object type
one uses.
 
Wow. You're probably right about that.

I'll have to verify that that is the problem, but if that's so, then it
should be a fairly easy fix.

(e-mail address removed) wrote in message
Hi. I have a program that makes an ODBC connection with an MS Access
database. When Windows' system language is set to anything other
then English I get an error.

This program reads a bunch of values from the database, does some
computation, and then writes results back to the database. The reads
seem to work okay, but at the end when it is trying to write to the
DB, I get this error:

SQL Error State:21S01, Native Error Code: FFFFF240, ODBC Error:
[Microsoft][ODBC Access Driver] Number of query values and
destination. Number of query values and destination fields are not
the same.

I never get this error when the system is set to English, but any
other language produces that error. The language of the access
driver seemsto make no difference.

Any help would be appreciated.

One guess - some of the data you update/append to the db, is numeric,
containing decimals, and you do this update through dynamic sql?

If I'm correct, then in countries using comma as decimalseparator
123.42 becomes 123,42 when concatenated into a string, which the Jet
engine interprets as values for two fielsd, not one.

In VB(A) one could either use the replace function

sSql = "somefield = " & replace(sngMyNum, ",", ".") & _

or use methods utilizing the paremeters collection of the object type
one uses.
 
No dice.

I changed the grouping symbol in the windows language settings from '.'
to ',' and the decimal symbol from ',' to '.', but I still got the same
error. Any other thoughts would be great.

Thanks.
Wow. You're probably right about that.

I'll have to verify that that is the problem, but if that's so, then it
should be a fairly easy fix.

(e-mail address removed) wrote in message
Hi. I have a program that makes an ODBC connection with an MS Access
database. When Windows' system language is set to anything other
then English I get an error.

This program reads a bunch of values from the database, does some
computation, and then writes results back to the database. The reads
seem to work okay, but at the end when it is trying to write to the
DB, I get this error:

SQL Error State:21S01, Native Error Code: FFFFF240, ODBC Error:
[Microsoft][ODBC Access Driver] Number of query values and
destination. Number of query values and destination fields are not
the same.

I never get this error when the system is set to English, but any
other language produces that error. The language of the access
driver seemsto make no difference.

Any help would be appreciated.

One guess - some of the data you update/append to the db, is numeric,
containing decimals, and you do this update through dynamic sql?

If I'm correct, then in countries using comma as decimalseparator
123.42 becomes 123,42 when concatenated into a string, which the Jet
engine interprets as values for two fielsd, not one.

In VB(A) one could either use the replace function

sSql = "somefield = " & replace(sngMyNum, ",", ".") & _

or use methods utilizing the paremeters collection of the object type
one uses.
 
(e-mail address removed) wrote in message
No dice.

I changed the grouping symbol in the windows language settings from
'.' to ',' and the decimal symbol from ',' to '.', but I still got
the same error. Any other thoughts would be great.

Thanks.

Kramer wrote:

Seing the code might help.
 
Back
Top