I downloaded and installed MySQL Connector 5.1 x64, so I can use MySQL with Delphi. I can connect to ODBC and connect from my Delphi environment and from MySQL Workbench.
But when I create my request at runtime, I get an error message:
Project AAA.exe raised the EOleException class with the message "Arguments are of the wrong type, are out of range, or are in conflict with each other." The process is stopped. Use Step or Run to continue.
My code is:
qDates := TADOQuery.Create(Component); qDates.Connection := FConnection; qDates.SQL.Text := 'select ' + ' * ' + 'from ' + ' resulttable ' + 'where ' + ' oid = :oid ' + ' and datedial >= :datebegin and datedial <= :dateend'; // <<-- Exception here
Details:
An exception occurs right in the text destination before I can configure the settings.
If I comment on the where clause, the assignment will be fine.
This is similar to Using Parameters with ADO Query (mysql / MyConnector) , but the difference is that I assign all the text at once and I get an exception before I have a chance to configure the parameters.
The incomprehensible part is that the same code works fine on my other machine, but I can't figure out what is different.
Therefore, the question is - what could cause the above exception outside of Delphi code and MySQL server?
mysql delphi
Kromster
source share