Annoying ODBC error

C

Clarkey

Hi,

I hope that someone has an idea on this one because I am ready to tea
my hair out.

I have some data in an Access database from which I query within Excel
From time to time, when I have completed the necessary task within M
Query and selected to return the data to Excel, there is a pause afte
which I get an error message as follows:

"[Microsoft][ODBC Microsoft Access Driver]Invalid character value fo
cast specification on column number 20 (200402)"

Column 20, with the heading "200402" is a value within the Access quer
representing the month which the data relates to, in this case month
of year 2004. There are other months within the query as well e.g
200306, 200307 etc. but it always seems to state 200402 in the error.

Is the naming convention I have used here created some kind o
confilict with the ODBC driver? Please help!!!

Many thanks
Pau
 
D

Debra Dalgleish

Can you convert the value to a string in Access, instead of a number?
That might eliminate the problem.
Hi,

I hope that someone has an idea on this one because I am ready to tear
my hair out.

I have some data in an Access database from which I query within Excel.
From time to time, when I have completed the necessary task within MS
Query and selected to return the data to Excel, there is a pause after
which I get an error message as follows:

"[Microsoft][ODBC Microsoft Access Driver]Invalid character value for
cast specification on column number 20 (200402)"

Column 20, with the heading "200402" is a value within the Access query
representing the month which the data relates to, in this case month 2
of year 2004. There are other months within the query as well e.g.
200306, 200307 etc. but it always seems to state 200402 in the error.

Is the naming convention I have used here created some kind of
confilict with the ODBC driver? Please help!!!

Many thanks
Paul
 
C

Clarkey

Thanks Debra I will do some update queries within Access to see if thi
will cure the problem. Will get back to you on the results of thi
 
C

Clarkey

Debra,

Sorry it took so long to get back to you on this - I had to break of
for a while.

When you say convert to a string, I tried changing the field type i
Access to text instead of number. Unfortunately, exactly the same erro
message was created.

The work around I have used is, instead of 200401, 200402 etc., chang
to 2004_01, 2004_02 etc. This has cured the issue.

For some reason, which I presume will always defeat me, the ODBC drive
did not like 200402 (this was the only year/month combination whic
created the message).

Thanks nevertheless
Pau
 
Top