Hi Blue,
The error in the code is beacuse of the following lines in your code
database_table = table( productNumber, stockNumber, supplierNumber, unitCost, productDescription);
sqlwrite(conn, database_table, data);
"sqlwrite" function expects second argument to be name of the database table.
This line of code creates a MATLAB table.
database_table = table( productNumber, stockNumber, supplierNumber, unitCost, productDescription);
The code works fine by replacing second argument in "sqlwrite" to any database table name such as 'productTable'
sqlwrite(conn,'productTable',data)