I believe Joel showed a technique where he appends the insert with a select @ID or the likes for sql server to get the last id added. I can not find the article/discussion.
INSERT INTO Structure (NodeName, ParentID )
Does anyone know a pre-.NET answer to the same question, though? I have the "use a two-line stored procedure instead" method on my to-implement pile, but I'd be pleased if there was more graceful approach.
Now there are two parts to the question: ADO vs. ADO.NET and Jet vs. MSDE.
@@identity is not good, use SCOPE_IDENTITY()
Fog Creek Home