distal-attribute
distal-attribute
distal-attribute
distal-attribute

I can insert records

frequent posted 3 years ago in Running SQL scripts
Hello @HeidiSQL,

I'm using Coldfusion8/MySQL5 (still newbie) and am looking for some tips on the following:

On my Coldfusion.cfc I'm calling a cfquery/stored procedure to insert a new records into the database.

This is my simple storedprocedure:

CREATE DEFINER=`root`@`127.0.0.1` PROCEDURE `proc_insert_user`(IN `user_iln` VARCHAR(13))
LANGUAGE SQL
DETERMINISTIC
MODIFIES SQL DATA
SQL SECURITY INVOKER
COMMENT ''
BEGIN
INSERT INTO teilnehmer (iln)
VALUES(user_iln);
END



The problem is, this inserts a new record, BUT I can't see it...

If I query the database for records, they all get returned, but the records never show up in my HeidiSQL window. I assume this must be somewhat related to my MySQL session (root@127.0.0.1) and the stored procedure (`root`@`127.0.0.1`), but even with both of them being the same, Heidi just does not show the records, that are currently in the table.

Can someone give me a pointer on what settings to tweak in order to see what gets inserted?

Thanks for help!




ansgar posted 3 years ago
You have a procedure with 1 parameter which does nothing but an INSERT into 1 column? Weird.. anyway, I would say that should work, without having tested.

You could test to do the INSERT from your "coldfusion.cfc" file directly, instead of calling the procedure, and see if that makes a difference.

Also, if you suspect HeidiSQL to have a bug, you should definitely look into the same table with another MySQL client, e.g. the command line client mysql.exe .
frequent posted 3 years ago
I just found it (search for a day)... The insert was part of a larger cftransaction and at the very end of the transaction I had a false statement, which in cftransaction unwinds everything again. So the insert to the database was made, but then reverted. That took some time to find. Now it seems to be working allright.

Thanks for the quick feedback! Really enjoying HeidiSQL. I started out with the MySQL workbench and am now a happy fan of Heidi!

Please login to leave a reply, or register at first.