> > > 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.
>
> I usually use
>
> SET NOCOUNT ON
> INSERT INTO people (password, username)
> VALUES ('something', 'testuser123456')
> SELECT @@identity AS lastID
>
> works in SQL 2000 for me...
Uh, yes, that's analogous to using
SELECT lastid = @@IDENTITY
The issue was that Tony had suggested storing the identity value in an SQL
variable, rather than returning it as a query column.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
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