Hi Eric, thanks for your reply
I did what you said but it is saying that queryResult is undefined
the code i used was
<cfstoredproc procedure="addOneToOneChildFolder" datasource="portexdb">
<cfprocparam type="in" cfsqltype="cf_sql_varchar" value="Hello" null="no">
<cfprocparam type="in" cfsqltype="cf_sql_bigint" value="1" null="no">
<cfprocparam type="out" cfsqltype="cf_sql_boolean" value="queryResult">
</cfstoredproc>
<cfoutput>#queryResult#</cfoutput>
and the mySQL procedure is as follows:
thanks again for your help
CREATE PROCEDURE portexdb.addOneToOneChildFolder(IN folderNameIn VARCHAR(50),
IN parentFolderIDIn BIGINT(20), OUT queryResult BOOLEAN)
BEGIN
DECLARE lastInsertedTableID BIGINT(20);
DECLARE lastInsertedTableName VARCHAR(50);
SET AUTOCOMMIT=0;
INSERT into tables VALUES (null, folderNameIn);
SELECT MAX(tableID) into lastInsertedTableID FROM tables;
SELECT tableName into lastInsertedTableName FROM tables where tableID =
lastInsertedTableID;
IF lastInsertedTableName = folderNameIn THEN
INSERT into tableChildren VALUES (parentFolderIDIn, lastInsertedTableID,
0);
COMMIT;
SET AUTOCOMMIT=1;
SET queryResult = TRUE;
Else
ROLLBACK;
SET AUTOCOMMIT=1;
SET queryResult = FALSE;
END IF;
END
//
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Enterprise web applications, build robust, secure
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:290371
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4