I usually use

        SET NOCOUNT ON
        INSERT INTO people (password, username)
        VALUES ('something', 'testuser123456')
        SELECT @@identity AS lastID
        
works in SQL 2000 for me...

-----Original Message-----
From: Dave Watts [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 11, 2002 3:36 PM
To: CF-Talk
Subject: RE: SQL Server 2000 and @@Identity


> also why aren't you declare lastid and making your statement
> 
> SELECT @lastid = @@identity

If he did that, he wouldn't get lastid back as a query column.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444


______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to