  | |  | ADO error on NOT NULL date or datetime columns | ADO error on NOT NULL date or datetime columns 2005-04-09 - By H?lder M. Vieira
Back With ADO and VB6, when selecting data from a table containing a DATE or DATETIME column defined as NOT NULL, data retrieval stops with error 80004005, 'Data provider or other service returned an E_FAIL status', apparently at the first row containing '0000-00-00' or '0000-00-00 00:00:00' values (on DATE or DATETIME fields, respectively). When the columns are defined as accepting NULL values, no error occurs when values '0000-00-00' or '0000-00-00 00:00:00' are fetched. The problem seems to be related with the use of ADO. It never happened while using RDO.
Servers: Windows ME, Windows 2000 Pro, Windows Server 2003 MySQL 4.1.09, MySQL 4.1.10, MySQL 4.1.11
Client: Windows ME VB6 SP6 MyODBC 3.51.11-1, MyODBC 3.51.11-2 MDAC 2.5 up to 2.8
Sample code: Set oadoConnection = New ADODB.Connection With oadoConnection .CursorLocation = adUseClient .ConnectionString = "DSN=TestDSN" .Open End With Set oadoRs = New ADODB.Recordset With oadoRs .Open "select * from TESTTABLE;", oadoConnection .Close End With Set oadoRs = Nothing
-- MySQL ODBC Mailing List For list archives: http://lists.mysql.com/myodbc To unsubscribe: http://lists.mysql.com/myodbc?unsub=mysql@(protected)
Earn $52 per hosting referral at Lunarpages.
|
|
 |