Hi,
The error message "Invalid connection in R2019a" indicates that there is a problem with establishing a connection to your database. Please refer to this link for guidance on properly establishing a database connection. If the connection is not correctly established, it will not be possible to write data to the database.