H
H
Hosting Yaroslavl2018-03-12 15:09:49
MySQL
Hosting Yaroslavl, 2018-03-12 15:09:49

Why does ADODC return "e_fail" status from data provider or other service when working with date?

Application in VB + MySql

Adodc1.RecordSource = "select id,brutto, date_brutto from vm_vzves ORDER BY date_brutto DESC"
    Adodc1.Refresh

On the line Adodc1.Refresh gives
the data provider or other service returned an e_fail status

The error occurs only if the date is not set. those. the row was created via the INSERT command and the date field was filled with the default value 0000-00-00 00:00:00
CREATE TABLE IF NOT EXISTS `vm_vzves` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date_brutto` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `date_brutto` (`date_brutto`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;

As a temporary measure - put in the database the default value for the fields with the date = "2000-01-01" - everything works. but I would like to be able to work with external databases where such crutches cannot be made.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question