Quantcast
Channel: MySQL Forums - MySQL for Visual Studio
Viewing all articles
Browse latest Browse all 417

Sending the primary key to to the VB program (no replies)

$
0
0
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.

Viewing all articles
Browse latest Browse all 417

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>