VB.net sending emails based on new records

Hello experts. I have a vb.net form that connects to a hosted MySQL database which contains a table for visitor data. As a secondary check (which I won't get into the reasons why) what I would ultimately like to do is hit a button that checks for any new records that were added to the table and send out an email showing which records were added. I created a form that connects to the database and have the datagridview showing all the records just to verify I am connecting with no issues. Its the code behind the button which I described above that I have zero clue how to accomplish. Below is what I have so far. Any help for a newbie learning to code which be most helpful.

App Configure Tab:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
    </startup>

  <connectionStrings>
    <add name="dbx" connectionString="server=xxxxxx;user id=xxxxx=;Password=xxxxxxxxx;database=XXXXXXX" providerName="MySqlData.MySqlClient" />
  </connectionStrings>
</configuration>

Form:

Imports System.Configuration
Imports MySql.Data
Imports MySql.Data.MySqlClient


Public Class Form2
    Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        DataGridView1.DataSource = GetVisitorsList()
    End Sub

    Private Function GetVisitorsList() As DataTable
        Dim dtVisitors As New DataTable
        Dim connstring As String = ConfigurationManager.ConnectionStrings("dbx").ConnectionString

        Using conn As New MySqlConnection(connstring)
            Using cmd As New MySqlCommand("Select FirstName, LastName, Company, Country, USCitizen, Citizenship, DateSubmitted From visitors order by DateSubmitted ASC", conn)


                conn.Open()

                Dim reader As MySqlDataReader = cmd.ExecuteReader()
                dtVisitors.Load(reader)


            End Using

        End Using

        Return dtVisitors



    End Function
End Class
DJ PAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nociSoftware EngineerCommented:
well to get a list of changes you need
1) an extra column in the database containing the datetimestamp of insert/last modify.... (implement it using constraints procedures)
2) keep a reference on last "buttonpress",
   so on buttonpress you need to lookup the last time the button was pressed,
   then find all records updated since then
   present the set
   then persistently store  the datetimestamp of buttonpress.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.