Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
- Posts: 26
- Joined: Fri 04 Aug 2006 09:45
Is MySqlDirect .NET provides any way to retrive primary key of just inserted row ?? If not can you please tell me best way of doing this "manually" ?
- Posts: 2756
- Joined: Mon 13 Mar 2006 07:43
There are several ways to do it:
- Use MySqlCommand.InsertId property.
Execute SELECT last_insert_id() statement.