From: Lennon Day-Reynolds Date: 2004-07-29T08:58:36+09:00 Subject: Re: Stupid ODBC! Warren: thanks for the pointer. That function does indeed tell you which columns serve as a unique identifier for the table, but it doesn't directly support the functionality I need for the Active Record adapter: namely, immediately after inserting a row, fetch the unique, internal, and hopefully immutable id for that row. Nathaniel: While SQL Server does have convenience functions for checking the current/most recent identity value, it does not require that you have any IDENTITY column in a table schema at all. In fact, many database design guidelines suggest you avoid them entirely, as they are simple numeric identifiers which have no semantic relationship to the data in your column. I'm not enough of a SQL Server guru to know in practice what portion of tables will lack an IDENTITY field, but I do know that the possibility, along with the suggestions I've seen in "best practices" documents to avoid them, makes me nervous about relying on that feature. All: I've email David about the issue, and hopefully we'll be able to figure out a minimally-invasive way to seperate the unique id functionality in the database adapters from the insert method. I'm happy to have more suggestions in the meantime, though. Lennon