From: Lennon Day-Reynolds Date: 2004-07-29T08:31:37+09:00 Subject: Re: Stupid ODBC! Well, that's closer, but it still isn't a totally general solution, since the table schema has to include an 'IDENTITY' column, right? That would mean that individual tables in a SQL Server database being used as an Active Record backend could need different unique id logic. That's not impossible, of course, it's just way more complexity than the current adapters require. Lennon On Thu, 29 Jul 2004 07:52:17 +0900, Nathaniel Talbott wrote: > On Jul 28, 2004, at 18:38, Lennon Day-Reynolds wrote: > > > The problem is that it appears that SQL Server (and most like the Jet > > engine, too) has *no* way to get said information -- if you want a > > 'rowid', it has to be in your table schema. > > Here's the code I used for SQL Server: > > SELECT @@identity > > I forget all the forms of that, and the exact scope it operates in, but > it should at least get you started. > > HTH, > > Nathaniel > Terralien, Inc. > > <:((>< > >