I'm using Coldfusion8 and MySQL and am trying to insert into a table.
However it is not working, no matter if I use a cfquery:
<cfquery datasource="dns" result="some">
INSERT INTO users(iln)
VALUES("1234567890123")
</cfquery>
<cfdump output="path.txt" var="#some#">
or Stored Procedure:
<cfstoredproc procedure="proc_insert_user" datasource="dns">
<cfprocparam type="In" cfsqltype="cf_sql_varchar" value="1234567890123" maxlength="13">
</cfstoredproc>
with the procedure inside MySQL:
CREATE DEFINER=`root`@`localhost` PROCEDURE `proc_insert_user`(IN `user_iln` VARCHAR(13))
LANGUAGE SQL
NOT DETERMINISTIC
MODIFIES SQL DATA
SQL SECURITY INVOKER
COMMENT ''
BEGIN
INSERT INTO users (iln)
VALUES(user_iln);
END
If I run the procedure from inside MySQL, it works. From Coldfusion however I cannot access the database. If I set a flag before and after the cfquery/storedProc, both flags show, so I assume there are no errors (I'm not getting any either)
Question: I guess I'm missing some settings in MySQL/Coldfusion. If so, where should I start searching?
Thanks for help!
EDIT:
When I try to insert a record as above, the table ID keeps increasing, but no new record is shown. So IDs are being created, but I can't see any records. Not sure if this helps.
EDIT2:
I have added a results parameter to the Cfquery. If I dump the results, I get:
CACHED: false
EXECUTIONTIME: 60
GENERATED_KEY: 42
RECORDCOUNT: 1
SQL: INSERT INTO teilnehmer(iln)
VALUES("1234567891231")