how to get values out of sproc

Discussion in 'ASP General' started by gdp, Sep 25, 2004.

  1. gdp

    gdp Guest

    hi...this is no doubt easy but I cant do it

    below is a sproc i am calling from an ASP page

    ------------------------------
    CREATE PROCEDURE dbo.populate_MAIN_visitors

    @IP nvarchar(20),
    @passScreen int

    AS

    declare @ident int
    declare @guid nvarchar(45)

    SET NOCOUNT ON

    insert into MAIN_visitors (IP,page,event_mark,guid) values
    (@IP,@passScreen,getdate(),newid())

    select @@IDENTITY as ident

    select guid as guid from MAIN_visitors where id=@@identity

    return @guid

    GO
    ------------------------

    i am calling it thus

    set rsInsertIP=con.execute("execute populate_MAIN_visitors '" &
    request.servervariables("REMOTE_HOST") & "'," & 0)

    i get the identity value back okay but i want the guid so i donjt have to do
    another query to get it (based on th identity)

    how can i return the values of the just inserted guid???

    thank you for any help given
    gdp, Sep 25, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UA==?=
    Replies:
    1
    Views:
    2,199
    Michelle Hlaing
    Nov 30, 2004
  2. Chad Micheal Lawson via .NET 247

    SQL 2k - ASP.NET - SPROC - "Input string was not in a correct format."

    Chad Micheal Lawson via .NET 247, Sep 24, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    597
    Greg Burns
    Sep 24, 2004
  3. =?Utf-8?B?c2tpcmtieQ==?=

    Problem using COMPUTE with SPROC on ASP Application

    =?Utf-8?B?c2tpcmtieQ==?=, Nov 1, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    288
    Scott Allen
    Nov 1, 2004
  4. Mike L.
    Replies:
    7
    Views:
    1,416
    Norman Yuan
    Jan 30, 2005
  5. mscertified

    How get an sproc OUTPUT parameter?

    mscertified, Sep 4, 2008, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    187
    Mark Stevens
    Sep 4, 2008
Loading...

Share This Page