I'm moving an app from MX7 mySQL 4 to MX 8 and mySQL5.0. I
have a query that does an infile insertion.
CODE:
<cfquery.....>
load data infile '#loadpath##loadfile#' replace into table
#sourcetable# fields terminated by '|' Lines terminated by '\r\n'
ignore 1 lines;
</cfquery>
From what I read all infile fields are processed as strings.
This creates a warning when a field value is going into an integer,
date etc. Under cf7/my4 the errors exist but the cfquery tag seemed
to just ignore them and everything worked fine.
Under mx8/my5 the errors are throwing an exception and I have
not been able to figure out how to get around it. MySQL5 by default
is in strict mode which I tried removing in my.ini as well as
adding "TRADITIONAL" as the mode. Neither worked.
Using a SQL client I did run the same infile commands against
mySQL5 and got the expected results of errors with all the inserts
completing. However when doing it through cfquery it halts on the
warning.
Any ideas of how to get cfquery or the driver to ignore a
warning (vs an error) in MX8? Any other ideas of things I could
try?
Thanks in advance,
Greg