Bug #8898 unable to read tables containing one or more timestamp fields (second posting)
Submitted: 2 Mar 2005 18:49 Modified: 30 May 2013 9:45
Reporter: fabio pratelli Email Updates:
Status: Closed Impact on me:
Category:Connector / ODBC Severity:S1 (Critical)
Version:MyODBC 3.51.11-1 OS:Windows (Windows XP SP1)
Assigned to: CPU Architecture:Any

[2 Mar 2005 18:49] fabio pratelli
My configuration:
client --> Visual Basic 6 Enterprise sp5 ; Windows XP sp1 ; MDAC 2.7 ; myodbc 3.51.11-1
server --> mysqld 4.0.18 ; linux mandrake 10.0

I'm using ADO objects DataGrid and ADODC in Visual Basic.
I'm unable to read data, or retrieve fields headers, from a table containing one o more timestamp fields; that is, when I try to retrieve, I get an empty recordset.
Moreover, from VB ide, putting a DataGrid and a ADODC control on a form, i'm unable to use the "retrieve fields" menu option, that is useful to obtain columns informations.

I've tried Excel XP also, adding a UserForm with a ADODC and a DataGrid controls on it... same behaviour.

NOTE FOR Miguel Solorzano

Dear Miguel Solorzano,

frist of all i thank you for the previous response. I have had to open a second bug with the same Synopsis, because the frist one has been closed, and i was unable to add any comment.
In Your tests You have used Access 2003. What steps have you done? have you created a System DSN ? have you linked or imported the table in a Access 2003 db ?
Following Your notes, I also have tested with Access XP, and, indeed, it seems to work, but (I suppose) only because Access CHANGES the type of the timestamp into "text" in the linked or imported table.

I was asking if there are known workarounds using standard ADO objects because, I'm not using Access.

To conclude I ask You:
1) am I wrong ?
2) is it a bug or simply a behaviour of myodbc driver ?
I must say that i'm not an OLEDB expert, so excuse me if i miss techincal details.

Fabio Pratelli

How to repeat:
on server: 
1) create a table with one or more timestamp

on client:
1) create a userform from Visual Basic an add an ADODC control and a DATAGRID control.

1.1) ADODC.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=the server;DATABASE=the database;UID=the user id;PWD=the password;OPTION=2051" **
1.2) ADODC.RecordSource = "the table"
1.3) DataGrid.DataSource = the ADODC object

** as suggested in myodbc documentation 2051 = 2048 compressed protocol + 2 + 1

now try to read data or simply use the "retrieve fields" menu option from VB IDE

Suggested fix:
If one change the type of the column from timestamp(14) into, for example, varchar(14), there are no problems in reading data and fields infos
[2 Mar 2005 19:49] MySQL Verification Team
Dear Fabio,

I think for to test better your issue, can you create with Access
a small application with a form and adding a button put your
code in its click event and then attach it using here the
tab files ?. Also please attach the dump of the table used.

Thanks in advance.
[2 Apr 2005 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[30 May 2013 9:45] Bogdan Degtyariov
I'm closing this bug because I can not continue without feedback from the reporter. If you have new info, please reopen the report.