Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the libmysql.dll library to connect to my database from a 3rd party application (metatrader).

I managed to connect and things are going almost fine. I use mysql_real_connect and mysql_errno for connecting and capturing possible errors. I'm using the InnoDB engine and STRICT_TRANS_TABLES in SQL mode.

Questions / Doubts:

  1. I thought mysql_errno only captures errors and not warnings, but I'm getting a 1264 MySQL warning in metatrader (1264 SQLSTATE: 22003 (ER_WARN_DATA_OUT_OF_RANGE)), however it doesn't say where. How can I resolve this?

  2. If I try to manually UPDATE or INSERT against my database I get no warnings and/or errors.

I would like to know if this is a libmysql bug or find out what's going on. Perhaps there is a specific table/field responsible?

Any pointers?

share|improve this question
Please, show me the way you are connecting to metatrader – Hackerman Apr 12 '13 at 1:03

check my.inior my.cnf if its contain sql-mode = "STRICT_TRANS_TABLES, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION" if so you need to change it to sql-mode = "NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION" then restart the SID service. Hope that will fix the issue for you

share|improve this answer

I think there is a stored procedure which is defining the range, and, when triggering, is triggering is a not corret way, for example like an error and not like a normal warning. Is it possible ?

share|improve this answer
Why downvote? In a situation I've seen exactly what I've wrote; if it's not your case .. why downvote, simply ignore ! – realtebo Aug 5 '13 at 11:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.