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

I can insert records

User, date Message
Written by frequent
2 years ago
Category: Running SQL scripts
2 posts since Mon, 04 Jun 12
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!




Written by ansgar
2 years ago
4940 posts since Fri, 07 Apr 06
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 .
Written by frequent
2 years ago
2 posts since Mon, 04 Jun 12
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.