14 Jun 2017 Add the "New" key word to your command declaration. Dim cmd As New MySqlCommand. "With" just set the properties, it does not initialize the object..