Return Last ID (IDENTITY) On Insert row VB.NET MySQL
Dim insert_coupon_query As String = ("INSERT INTO qa_discountcoupons (id, status_code) VALUES (AUTO_INCREMENT_ID, 5)") Dim cmd_query As New MySqlCommand(insert_coupon_query, objConn) Dim cmd_result As Integer = CInt(cmd_query.ExecuteScalar()) I want to return the AUTO_INCREMENT value of the current insert, and show in a msgbox. Answers: Thank you for visiting the Q&A section on Magenaut. Please note that all … Read more