Bug #8178 | Problem with Time types with ODBC connection | ||
---|---|---|---|
Submitted: | 28 Jan 2005 10:55 | Modified: | 29 Jan 2005 1:01 |
Reporter: | Suzie Winllam | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | Connector / ODBC | Severity: | S2 (Serious) |
Version: | 3.51 | OS: | Windows (Win Xp) |
Assigned to: | Dean Ellis | CPU Architecture: | Any |
[28 Jan 2005 10:55]
Suzie Winllam
[28 Jan 2005 10:57]
Suzie Winllam
a
[29 Jan 2005 1:01]
Dean Ellis
I have tested 3.51.10 and the DATE, TIME and DATETIME column types are returned as the ODBC Date, Time, and Timestamp types (respectively), so I cannot repeat this based only on this description. If you can give us a repeatable test case, please do so we can test for a bug.
[29 Jan 2005 18:08]
Suzie Winllam
To repeat the problem made this: -Install MYsql 4.1 -Install MySql ODBC connetor 3.51 -Create Database mySql -Create a table MyTable with a column Time1 -Insert some row -Create a DSN called MyDsn user=myuser pwd=mypwd -Make a VB Program -Make a new Project -Add a command button -reference Microsoft ADODB library - Execute the following code Private Sub Command1_Click() Dim rs As ADODB.Recordset Dim conn As ADODB.Connection Set conn = New ADODB.Connection 'make a connection to a DSN named MyDsn, user=myuser, mwd=mypwd (user and pwd in MySql db with privileges); conn.ConnectionString = "Provider=MSDASQL;DSN=MyDsn;UID=myuser;pwd=mypwd;" conn.Open Set rs = New ADODB.Recordset rs.CursorLocation = adUseClient 'Open table (myTable) with a Time type column called Time1 'In table there is a record with time in column Time1 (ex. 11:30:00) rs.Open "select * from myTable", conn Do While Not rs.EOF 'Result is a date not the time set above Debug.Print rs.Fields("time1") rs.MoveNext Loop rs.Close Exit Sub