Bug #8869 unable to read tables containing one or more timestamp fields
Submitted: 1 Mar 2005 16:09 Modified: 1 Mar 2005 19:01
Reporter: fabio pratelli Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Connector / ODBC Severity:S1 (Critical)
Version:mysql 4.0.18 OS:Windows (Windows XP SP1)
Assigned to: CPU Architecture:Any

[1 Mar 2005 16:09] fabio pratelli
Description:
I'm using:
client --> Visual Basic 6 sp5 ; Windows XP sp1 ; MDAC 2.7 ; myodbc 3.51.11
server --> mysqld 4.0.18 on a linux mandrake 10.0

I'm unable to read from a table containing a timestamp field.
When I try to retrieve I get an empty recordset; moreover, from VB ide, putting a DataGrid control on a form, i'm unable to use the "retrieve fields" option.

Is there a known workaround ?
Thanks.

How to repeat:
Create a table with a timestamp.
Try to read data or table fields name from Visual Basic, Excel or whatever...
[1 Mar 2005 19:00] MySQL Verification Team
I created the below table on my Linux box:

miguel@hegel:~/dbs/4.0$ bin/mysql -uroot test -e"create table tt (id int, t timestamp)"
miguel@hegel:~/dbs/4.0$ bin/mysql -uroot test -e"insert into tt (id) values (1),(2)"
miguel@hegel:~/dbs/4.0$ bin/mysql -uroot test -e"select * from tt"
+------+----------------+
| id   | t              |
+------+----------------+
|    1 | 20050301153507 |
|    2 | 20050301153507 |
+------+----------------+
miguel@hegel:~/dbs/4.0$ 

Tested with Access 2003 on my XP without problem, below also
the test with ODBCTE32.EXE tool using the same DSN as Access.

Full Connect(Default)

	Env. Attr. SQL_ATTR_ODBC_VERSION set to SQL_OV_ODBC3

	Successfully connected to DSN 'Tester'.
SQLExecDirect:
In:hstmt = 0x003A1908, szSqlStr = "select * from tt", 
cbSqlStr = -3
Return:	SQL_SUCCESS=0

Get Data All:
"id", "t"
1, 2005-03-01 15:35:07
2, 2005-03-01 15:35:07
2 rows fetched from 2 columns.
[1 Mar 2005 19:01] MySQL Verification Team
Sorry, forgot to mention I used 3.51.11-1.