Hi, I have a question in PostGreSQL, please go through below mail: When I send update query command from front end then PostGreSql is responding with number of rows affected. But when I send same update query which is embedded in stored procedure (as listed below) then PostGreSql doesn't respond with a value of -1. CREATE OR REPLACE FUNCTION samplepro5(deptid int) RETURNS void AS $BODY$ UPDATE EmailLoginUsers SET LoginID = 'a...@sample.com Where UserCheckedMailID = $1; $BODY$ LANGUAGE 'sql' VOLATILE COST 100; >From front end, I have called above listed stored procedure by using below listed code: objNpgSQLCommand.CommandText = "samplepro5";
objNpgSQLCommand.CommandType = CommandType.StoredProcedure; NpgsqlParameter objParameter; objparameter.ParameterName = "deptid"; objparameter.NpgsqlDbType = NpgsqlTypes.NpgsqlDbType.Integer; objparameter.Value = 1; objparameter.Direction = ParameterDirection.Input; objNpgSQLCommand.Parameters.Add(objParameter); int numberOfAffectedRows = objNpgSQLCommand.ExecuteNonQuery(); After excuting above code, the value of numberOfAffectedRows was -1 but database was updated with one record. Please tell me what's wrong. Thanks, Sridhar G