SimonHawkins
Programmer
Hi
I'm developing an intranet application using SQL Server 2000. I have a few stored procedures (an example of which is at the foot of the page), which include an insert statement followed by an identity select. This has been working fine, and it still works fine on my development server, but for some reason the identity value isn't being returned to my ASP page on the live server. It works fine when I run the query through Query Analyzer. In an attempt to debug, I have changed the identity select to another simple select statement, and that isn't returning a value either.
This problem began when I destroyed and recreated the tables within the database (and then re-imported the data). Does anyone have any idea what could be causing this? The live site does have a digital certificate so it could be related to that too.
Any ideas would be greatly appreciated.
Here's that procedure:
CREATE PROC dbo.bor_comps_ins
@comptype int,
AS
SET NOCOUNT ON
INSERT bor_comps (comptype) VALUES (@comptype)
select @@IDENTITY as compid
SET NOCOUNT OFF
I'm developing an intranet application using SQL Server 2000. I have a few stored procedures (an example of which is at the foot of the page), which include an insert statement followed by an identity select. This has been working fine, and it still works fine on my development server, but for some reason the identity value isn't being returned to my ASP page on the live server. It works fine when I run the query through Query Analyzer. In an attempt to debug, I have changed the identity select to another simple select statement, and that isn't returning a value either.
This problem began when I destroyed and recreated the tables within the database (and then re-imported the data). Does anyone have any idea what could be causing this? The live site does have a digital certificate so it could be related to that too.
Any ideas would be greatly appreciated.
Here's that procedure:
CREATE PROC dbo.bor_comps_ins
@comptype int,
AS
SET NOCOUNT ON
INSERT bor_comps (comptype) VALUES (@comptype)
select @@IDENTITY as compid
SET NOCOUNT OFF