0
I am doubtful in the date format that ODBC performs. I tried every way and nothing. This Query performs normal if I insert only the code, but when I want to enter dates it does not execute. I believe it is because of the format. Can someone help me?
$Query = "INSERT INTO TABLE(CODIGO, DATA_CRIADO) values (300, '2017-01-01')";
ODBC_exec($conn, $Query);
Try to catch the mistake with
var_dump(odbc_errormsg($conn));
your connection is like autocommit?– rray
Yes, the connection is autocommit
– Rafael Brito
In which line does this syntax enter?
– Rafael Brito
can be
ODBC_exec($conn, $Query) or die(odbc_errormsg($conn));
– rray
It worked. ORA-01843: not a Valid Month
– Rafael Brito
Found, it only accepts the written month. Example '10/may/2017"
– Rafael Brito
use the formatted TO_DATE function to insert, making it always be converted before https://www.techonthenet.com/oracle/functions/to_date.php
– Andrey Hideki Nakano