Insert data in MySQL table

Hi! I am trying to insert data into a MySQL Data table but I keep on getting this error:

“ERROR [HY000] [MySQL][ODBC 8.0(a) Driver][mysqld-5.5.5-10.4.14-MariaDB]Column ‘Buque_Vessel’ cannot be null”

I dont understand why I get this error if parameters I am passing are not null:

I am using “Execute non query” activity with “Parameters” and “sql” query like this:

SQL Query = “Insert into Table_Name values(@Buque_Vessel, @Viaje_Voyage, @E_T_A, @Terminal)”

Connection to MySQL data base using ODBC is working fine and variable types to be inserted match those in data table. Columns in data table in MySQL are:

  • Buque_Vessel VARCHAR(100) NOT NULL
  • Viaje_Voyage VARCHAR(100),
  • Terminal VARCHAR(100) NOT NULL



Check if Buque_Vessel is getting the value?

It should not be null as per the schema it’s not allowing the Null

So check the value is passing correctly

Hope this may help you


Hi, thanks for your answer! Yes, Buque_Vessel and the rest of the variables are getting the values to feed the parameters in execute non query:

I solved it, changed “sql” query to be a string variable in which I stored the following: “INSERT INTO Table_Name VALUES (’”+Buque_Vessel+"’,’"+ Viaje_Voyage+"’,’" +E_T_A+"’, ‘"+Terminal+"’);"

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.