how to get a stored proc return value in Ent lib provider
Posted: Tue 23 May 2006 17:05
hello, this is a basic question. We have bought the 2.5 Pro version and I need to call a Postgres function using the Enterprise Library data access block. The function takes only input parameters, and returns a bool, such as:
IF devcount >= 1 THEN
RETURN TRUE;
ELSE
RAISE NOTICE '01';
RETURN FALSE;
END IF;
I can run the function and it workd fine in pgadmin. I've not been able to get a correct return value using ExecuteScalar, but I see this only works if you are doing a SELECT. What would the syntax look like to get a function value returned from a RETURN statement like this ? Thanks.
IF devcount >= 1 THEN
RETURN TRUE;
ELSE
RAISE NOTICE '01';
RETURN FALSE;
END IF;
I can run the function and it workd fine in pgadmin. I've not been able to get a correct return value using ExecuteScalar, but I see this only works if you are doing a SELECT. What would the syntax look like to get a function value returned from a RETURN statement like this ? Thanks.