MySQL Forums
Forum List  »  MySQL for Visual Studio

Sending the primary key to to the VB program
Posted by: Thor Skonnord
Date: July 10, 2020 05:20PM

My VB.Net program uses a MySQL database that resides in the remote server. When a new record is created, MySQL auto generates a primary key called RecordID. A ClientName and CustomerName is also created base on the user name and client name.

In order to select a saved record, a ListBox uses the RecordID as DataValueField and the CustomerName as the DataTextField. So when the ListBox loads, it reads all the saved records that match the RecordID. Then the user clicks the CustomerName and this matches the invisible RecordID.

This is fine when retrieving a saved record. The problem is that right after a record has been created, the program does yet not know what the associated RecordID is.

Is there a way to "send" the new RecordtID to the program when the new record is created? That way, if the user wants to update a newly saved data record, it would know what record to update using the RecordID.

I hope this makes sense.

Options: ReplyQuote

Written By
Sending the primary key to to the VB program
July 10, 2020 05:20PM

Sorry, you can't reply to this topic. It has been closed.

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.