MyOdbc <-> Access2000 and Time Column

MyOdbc <-> Access2000 and Time Column

am 05.05.2006 21:58:19 von Kai Koch

Hi!

I have the following problem with Access2000 as frontend
connected to a MySql-Server via ODBC.

The Table contains 6 Time Columns.
When linking the MySQL-Table in the table tab of Access2000
and then opening the table, all Time Columns show either
nothing or strange date values. (eg. 18:30:00 is converted
to 31.05.21)
Data stored from Access2000 into the table is stored right
in MySQL, but shown wrong in the linked table in Access2000
and therfore stored wrong in a mirror table in Access2000.

Using the same MySQL-Table with an Access97 frontend and the
SAME ODBC-Datasource shows the proper values and data
exchange between Access97 and MySQL works fine!

OS: Win98SE (same on win2k)
ODBC: MySQL ODBC 3.51 Driver - Version 3.51.12.00
Application: Access2000 (MDAC 2.8 SP1, Jet40 SP8 9x&NT)
MySQL-Server: MySQL 4.0.12-standard-log on linux

Searching the web and this mailinglist, I found only
workarrounds, that do not apply in my case. Since changing
the Column-Type is not an option.

Anyone can help?

Thank You,
Kai

--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org

Re: MyOdbc <-> Access2000 and Time Column

am 08.05.2006 00:23:25 von Daniel Kasak

Kai Koch wrote:

> Hi!
>
> I have the following problem with Access2000 as frontend connected to
> a MySql-Server via ODBC.
>
> The Table contains 6 Time Columns.
> When linking the MySQL-Table in the table tab of Access2000 and then
> opening the table, all Time Columns show either nothing or strange
> date values. (eg. 18:30:00 is converted to 31.05.21)
> Data stored from Access2000 into the table is stored right in MySQL,
> but shown wrong in the linked table in Access2000 and therfore stored
> wrong in a mirror table in Access2000.

Access doesn't understand TIME fields.
You have to use a DATETIME field, and prepend:

1899-12-30 to the front of each value!

ie 08:30:21 becomes:
1899-12-30 08:30:21

It's infuriating, but it works. There are alternatives to MS Access:
http://entropy.homelinux.org/axis_not_evil

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak@nusconsulting.com.au
website: http://www.nusconsulting.com.au

--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org