In my code I do an insert into one table, get the row id of the inserted record, then insert a related record in another table.
Do you need to surround your code with a "BEGIN IMMEDIATE" "COMMIT" to ensure there are no other inserts into the first table between the insert and get_inserted_rowid()? I did it that way thinking it's a necessary precaution. --- Clay Dowling <[EMAIL PROTECTED]> wrote: > > Peter Jay Salzman said: > > Do these two functions do the same thing? Are there any surprises > or > > differences between the two? > > They do close enough to the same thing that you don't need to worry > about > it. SQLite ROWIDs can be recycled if you didn't define an > autoincrement > column and your table has deleted records. It's generally not a > problem > if your app is good about maintaining referential integrity, but if > you've > been slack it can cause some interesting behavior. > > Clay Dowling > -- > Lazarus Notes from Lazarus Internet Development > http://www.lazarusid.com/notes/ > Articles, Reviews and Commentary on web development > --------------------------------- "Lord Tarlington gazed upon the crazed Egyptian hieroglyphics on the walls of the ancient tomb of the petrified pharaoh, he vowed there would be no curse on him like on that other Lord, unless you count his marriage to Lady Tarlington who, when the lost treasure was found, will be dumped faster than that basket in the bulrushes." Melissa Rhodes --------------------------------- The Castles of Dereth Calendar: a tour of the art and architecture of Asheron's Call http://www.lulu.com/content/77264 __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo

