Bug #7918 | DATE Datatype value "0000-00-00" _not_ converted to NULL by ODBC | ||
---|---|---|---|
Submitted: | 14 Jan 2005 22:26 | Modified: | 19 Jan 2005 19:14 |
Reporter: | James Blevins | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | Connector / ODBC | Severity: | S3 (Non-critical) |
Version: | 3.5.??? | OS: | Windows (Windows 2000 Advanced Server) |
Assigned to: | CPU Architecture: | Any |
[14 Jan 2005 22:26]
James Blevins
[14 Jan 2005 22:29]
James Blevins
There's a typo. In the query, it should be: qry = "SELECT * FROM test" I just used the table 'asdfg' for my own testing purposes before the bug submit. I have no idea why.
[14 Jan 2005 22:32]
James Blevins
Another typo. Instead of 'response.write Account_rs("thing") response.write isNull(Account_rs("thing")) It should be 'response.write Result_rs("asdfg") response.write isNull(Result_rs("asdfg")) Anyway, If you use the correct variables, it will behave as described. That's what I get for doing this at the end of my workday.
[17 Jan 2005 19:13]
James Blevins
Strange and curious. I had updated to the latest driver, but still had the bug. However, I had to restart IIS today, and now the bug is non-existent on the exact same script. Maybe it was something fixed between versions and the new version didn't take until I restarted IIS. I have no clue. But now things work as expected, so this should probably be closed.
[19 Jan 2005 19:14]
Jorge del Conde
Was unable to repeat this bug using MS Access 2003 & ASP
[9 Feb 2006 23:31]
Jason Nance
I can recreate this bug using Visual Basic 6, ADO 2.8, and MyODBC 3.51.12-win32. CREATE TABLE `foo` ( `pk` int(10) unsigned NOT NULL auto_increment, `df` date NOT NULL default '0000-00-00', PRIMARY KEY (`pk`) INSERT INTO `foo` VALUES ( NULL, '0000-00-00' ); The, in VB, create a new "Standard EXE" project. Add the "Microsoft ActiveX Data Objects 2.8 Library" reference. Finally, run the following code: Dim objODBCConnection As New ADODB.Connection Dim rstTest As New ADODB.Recordset Dim strSQL As String objODBCConnection.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=theServer;"DATABASE=theDatabase;UID=username; PWD=password;OPTION=3" objODBCConnection.open rstTest.CursorLocation = adUseClient strSQL = "SELECT * FROM foo" rstTest.Open strSQL, objODBCConnection Place a breakpoint on the "rstTest.Open" line and a watch on "rstTest". The status property after the line is executed becomes "Either BOF or EOF is True, or the current reocrd has been delete. Requested operations requires a current record." Also notice that PageCount and RecordCount failed.
[9 Feb 2006 23:32]
Jason Nance
This bug and bug #7918 are similar, if not duplicates.
[12 Feb 2010 13:13]
Tonci Grgin
Check Bug#3621.