MySQL Forums
Forum List  »  Quality Assurance

Posted by: paulo frutuoso
Date: July 16, 2016 07:55AM

HELLO. Sorry my english.

Two years ago I use MySQL 5.0.18 and 3:51 ODBC connector to interface
between the PLC ( OPC ) and the database through an application of the ALLEN -BRADLEY called FactoryTalk .
All was well

WHEN i wanted Change to the version 5.6.29 with the ODBC Connector 5.3 , I can not insert any record, because the Error that i show below.

-- [MySQL][ODBC 5.3(w) Driver][mysqld-5.6.29-log]Incorrect datetime value: '' for column 'data_real' at row 1
INSERT INTO maq_h40 ( data, n52_0, n52_1, n52_2, n52_3, n52_4, n52_5, n52_6, n52_7, n52_8, n52_9, data_real) VALUES ('7/16/2016 13:09:08', 4500, 550, 0, 0, 0, 0, 0, 0, 0, 0, '2016-07-16 13:09:08.395' )

If you notice there are two fields (date and data_real ) . The 1st is a varchar and the second a datetime .
I wanted to see that statement was presented to the engine.

However, if this statement perform this , for instance in the workbench , the record is inserted smoothly.

The only way I found to solve this was to make an insert on the table without data_real field and then , through a trigger update the date field.

I tried to do it with the connector 3.51, but without success.

Can you help me ?

Options: ReplyQuote

Written By
July 16, 2016 07:55AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.