Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange problem

Status
Not open for further replies.

SimonHawkins

Programmer
Joined
Dec 9, 2002
Messages
2
Location
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top