how to get values out of sproc

G

gdp

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top