Sqlite on the iPhone - Retrieving the last inserted row id with MonoTouch - More Wally - Wallace B. McClure
in

MoreWally.com

Giving people what they want, More Wally. This is the technical and personal blog site of
Wallace B. (Wally) McClure.

This Blog

Syndication

Technical Sites

More Wally - Wallace B. McClure

This blog will have all kinds of posts about Wally McClure. In it, there will be tons of .NET and computer programming posts as well as Wally's views on life in general. As you might guess, this site and blog help you get More Wally in your life. What more could anyone want? .NET, ADO.NET, ASP.NET, AJAX, Atlas, Microsoft AJAX Library, ASP.NET AJAX, and now Windows Azure............follow me on twitter at Wally

Sqlite on the iPhone - Retrieving the last inserted row id with MonoTouch

I'm a database type of guy. I like data. I work with data all the time. One thing that is common across all database is the need to retrieve the row identifier of a record that was just inserted. Oracle has a sequences. Sql Server has scope_identity(). I've been learning the Sqlite database on the iPhone and have been accessing it through MonoTouch using ADO.NET. With SqlLite, you call "last_insert_rowid()" on the current connection. This allows a program to retrieve the primary key that was just inserted. The method runs on the current connection. Its actually related more to @@identity in Sql Server as it returns the last rowid of the last record that was inserted on the current connection.

Comments

 

Dew Drop – February 12, 2010 | Alvin Ashcraft's Morning Dew said:

Pingback from  Dew Drop – February 12, 2010 | Alvin Ashcraft's Morning Dew

February 12, 2010 9:04 AM
 

Dalexsoto said:

Hey wally could you do me a big favor? i really dont understand how windows or views work, i mean you can on visual studio create forms and call them with .show() method but i dont know how to make them on monotouch, could you give me a hand with this?? Please :D, btw your book its awsome

February 15, 2010 11:46 PM
2006 - Wallace B. McClure
Powered by Community Server (Non-Commercial Edition), by Telligent Systems