Subject | Re: Stored Procedure -- Select |
---|---|
Author | petersi |
Post date | 2005-09-30T12:27:29Z |
Hi,
The stored procedure is as follows:
----------------------------------------------------------
CREATE PROCEDURE QUERY_FOR_USER_ACCESS (
USER_LOGIN_NAME VARCHAR (50) CHARACTER SET NONE,
USER_PASSWORD VARCHAR (50) CHARACTER SET NONE,
STORE_ID INTEGER)
RETURNS (
USERNAME VARCHAR (50) CHARACTER SET NONE,
USERLOGGED CHAR (1) CHARACTER SET NONE,
USERID INTEGER,
USERGROUP INTEGER)
AS
BEGIN
SELECT
USERS.logged,
USERS.name,
USERS.user_group_id,
USERS.user_id
FROM
users,store_user
WHERE
USERS.userlogin_id = :USER_LOGIN_NAME AND
USERS.passwd = :USER_PASSWORD AND
USERS.user_id = store_user.user_id AND
store_user.store_id = :STORE_ID
INTO
:USERLOGGED,
:USERNAME,
:USERGROUP,
:USERID;
SUSPEND;
END
----------------------------------------------------------
It does have a SUSPEND, but I'm using the default IB Manager setting,
so I'm not exactly sure if it's in the right place. Thanks for the
info on the .NET FB forum group, I'll check there also.
Peter
--- In firebird-support@yahoogroups.com, Pavel Menshchikov
<developer@l...> wrote:
The stored procedure is as follows:
----------------------------------------------------------
CREATE PROCEDURE QUERY_FOR_USER_ACCESS (
USER_LOGIN_NAME VARCHAR (50) CHARACTER SET NONE,
USER_PASSWORD VARCHAR (50) CHARACTER SET NONE,
STORE_ID INTEGER)
RETURNS (
USERNAME VARCHAR (50) CHARACTER SET NONE,
USERLOGGED CHAR (1) CHARACTER SET NONE,
USERID INTEGER,
USERGROUP INTEGER)
AS
BEGIN
SELECT
USERS.logged,
USERS.name,
USERS.user_group_id,
USERS.user_id
FROM
users,store_user
WHERE
USERS.userlogin_id = :USER_LOGIN_NAME AND
USERS.passwd = :USER_PASSWORD AND
USERS.user_id = store_user.user_id AND
store_user.store_id = :STORE_ID
INTO
:USERLOGGED,
:USERNAME,
:USERGROUP,
:USERID;
SUSPEND;
END
----------------------------------------------------------
It does have a SUSPEND, but I'm using the default IB Manager setting,
so I'm not exactly sure if it's in the right place. Thanks for the
info on the .NET FB forum group, I'll check there also.
Peter
--- In firebird-support@yahoogroups.com, Pavel Menshchikov
<developer@l...> wrote:
> Hello Peter,stored
>
> p> I am using the .NET extension for firebird, and I am calling a
> p> procedure (that uses a SELECT statment). There is always atminimum 1
> p> record returned when calling the stored procedure (through .NETstandard
> p> interface), even when there should be no records. Is this a
> p> behavior?
>
> Do you have a selectable stored procedure (which SUSPENDs when it
> needs) in a SELECT statement? Or do you use an executable stored
> procedure (no SUSPENDs) in a SELECT statement or in / instead of
> EXECUTE PROCEDURE statement?
> You also may ask the question in the firebird-net list.
>
>
>
> --
> Best regards,
> Pavel Menshchikov
> http://www.ls-software.com/