MySQL Forums
Forum List  »  MySQL for Visual Studio

Re: Sending the primary key to to the VB program
Posted by: JOSE RAMIREZ
Date: August 14, 2020 09:53AM

Hello Thor,

If your primary key is set to auto-increment, after creating the record you could simply perform an additional query where you get the highest RecordID. That way you would be getting the RecordID of the recently created record and can pass it on to your program. Something like "SELECT MAX(RecordID) FROM my_table;".

Hope that helps.

====================================
Jose Ramirez
MySQL on Windows Team

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Sending the primary key to to the VB program
92
August 14, 2020 09:53AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.