Skip navigation links

MySQL Forums :: MySQL Query Browser :: Column can not be null


Advanced Search

Re: Column can not be null
Posted by: Guy Shen ()
Date: January 14, 2010 09:44AM

Hm... No dice.
But i have tried using DataReader.hasrows() function to check if the reader has any returned rows from the query.
The reader doesn't have any rows at all, so i guess it just doesn't fetch any data from the database, although it does insert the values properly into the table, hence something must be wrong with the sql query.

Here it is :

DELIMITER $$

DROP FUNCTION IF EXISTS `create_new_cust` $$
CREATE DEFINER=XXX@`localhost` FUNCTION `create_new_cust`(CN char(255),CC char(255)) RETURNS int(11)
BEGIN
INSERT INTO customer VALUES (CN,CC);
RETURN 1;
END $$

DELIMITER ;

Im trying to fetch that "1". Do you see anything wrong?

P.s. can you explain why it writes RETURNS int(11) when it actually returns "1" ?

Options: ReplyQuote


Subject Written By Posted
Column can not be null Guy Shen 01/11/2010 04:37PM
Re: Column can not be null Chad Bourque 01/11/2010 07:53PM
Re: Column can not be null Guy Shen 01/12/2010 03:07AM
Re: Column can not be null Chad Bourque 01/12/2010 09:03AM
Re: Column can not be null Guy Shen 01/12/2010 05:22PM
Re: Column can not be null Guy Shen 01/12/2010 06:39PM
Re: Column can not be null Chad Bourque 01/13/2010 05:44PM
Re: Column can not be null Guy Shen 01/14/2010 09:44AM
Re: Column can not be null Guy Shen 01/14/2010 06:28PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.