Results 1 to 3 of 3

Thread: Different behaviour of a SP called from SQL Query and from MS Access

  1. #1
    Mircea PREDUT Guest

    Different behaviour of a SP called from SQL Query and from MS Access

    Hi,
    Please help me to elucidate a mistery !

    I have a little SP in a database:

    CREATE PROCEDURE XXXTest AS

    DECLARE @a varchar(50)

    SELECT @a = NULL

    IF @a NOT IN ('x', 'y&#39
    BEGIN
    RAISERROR ('Error',16,1)
    RETURN 0
    END
    RETURN 1

    If I execute it from SQL Server, it returns 0. (after the error, of course).
    If I execute it from MS ACCess through a Pass Through Query, it returns 0.
    On the same server !!!
    How could it to make me that ? I have been thought the SP is executed entirely on the server !!!

    Thanks in advance clearing me the mind.
    Mircea.

  2. #2
    Guest

    ERRATA: Different behaviour of a SP called from SQL Query and from MS Access (reply)

    Subject:
    From:
    Date: Different behaviour of a SP called from SQL Query and from MS Access
    Mircea PREDUT (office@unicapital.eunet.ro)
    2/2/99 1:26:52 AM

    Hi,
    Please help me to elucidate a mistery !

    I have a little SP in a database SQL Server 6.5 / Service Pack 4:

    CREATE PROCEDURE XXXTest AS

    DECLARE @a varchar(50)

    SELECT @a = NULL

    IF @a NOT IN ('x', 'y&#39
    BEGIN
    RAISERROR ('Error',16,1)
    RETURN 0
    END
    RETURN 1

    If I execute it from SQL Server, it returns 0. (after the error, of course).
    If I execute it from MS ACCess through a Pass Through Query, it returns 0.
    On the same server !!!
    How could it to make me that ? I have been thought the SP is executed entirely on the server !!!

    Thanks in advance clearing me the mind.
    Mircea.

  3. #3
    alan Guest

    ERRATA: Different behaviour of a SP called from SQL Query and from MS Access (reply)


    On 2/2/99 1:35:28 AM, wrote:
    > Subject:
    From:
    Date: Different behaviour of a SP called from SQL Query
    > and from MS Access
    Mircea PREDUT (office@unicapital.eunet.ro)
    2/2/99
    > 1:26:52 AM

    Hi,
    Please help me to elucidate a mistery !

    I have a
    > little SP in a database SQL Server 6.5 / Service Pack 4:

    CREATE
    > PROCEDURE XXXTest AS

    DECLARE @a varchar(50)

    SELECT @a = NULL

    IF @a
    > NOT IN ('x', 'y&#39
    BEGIN
    RAISERROR
    > ('Error',16,1)
    RETURN 0
    END
    RETURN 1

    If I execute it from SQL
    > Server, it returns 0. (after the error, of course).
    If I execute it from
    > MS ACCess through a Pass Through Query, it returns 0.
    On the same server
    > !!!
    How could it to make me that ? I have been thought the SP is executed
    > entirely on the server !!!

    Thanks in advance clearing me the
    > mind.
    Mircea.


    Stored procedures will return a value to the caller

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •