Question: When i tried to insert, the error '*not enough values*' appears. 

```
public int CreateAdmin( string product_name, string quality, string quantity, string price, string product_image)
{            
    string connectionString = "User Id=hr;Password=hr;Data Source=localhost:1521/xe";

    OracleConnection orc = new OracleConnection();
    orc.ConnectionString = connectionString; //assign connection
    //OracleDataAdapter da = new OracleDataAdapter();
    orc.Open();

    OracleCommand cmd = new OracleCommand();//object of command
    cmd.Connection = orc;
    cmd.CommandType = CommandType.Text; // declare command type

    cmd.CommandText = "insert into Product values( :b, :c, :d, :a, :p)";

    cmd.Parameters.Add("@b", product_name); //add paramenter
    cmd.Parameters.Add("@c", quality);
    cmd.Parameters.Add("@d", quantity);
    cmd.Parameters.Add("@a", price);
    cmd.Parameters.Add("@p", product_image);

    //da.InsertCommand = cmd;
    int i = cmd.ExecuteNonQuery();
    orc.Close();
    return i;
}

```

Answer: 
Your paramnames are wrong, they need to be named as the one you set in params - you use `:a` in the command and `@a` when setting the parameter. Parameter start with `@` (for SqlServer) or `:` (for OracleServer).

If your table has more columns than those 5 you have to provide them as well, else the db does not know where to put the given parameters. (an auto-inc ID additionally is fine, if thats your 6th column it will work).

```
public int CreateAdmin (string product_name, string quality, string quantity, string price, string product_image)
{
  string connectionString = "User Id=hr;Password=hr;Data Source=localhost:1521/xe";

  using (var orc = new OracleConnection (connectionString))
  {
    using (var cmd = orc.CreateCommand ())
    {
      cmd.CommandType = CommandType.Text; // declare command type

      // Product has exactly 5 or 5 + 1 auto-inc ID column, else provide the
      // column names as well: 
      // insert into Product ( name,qual,quant,price,img ) values( :b, :c, :d, :a, :p)";
      cmd.CommandText = "insert into Product values( :b, :c, :d, :a, :p)";

      cmd.Parameters.Add (":b", product_name); //add paramenter
      cmd.Parameters.Add (":c", quality);
      cmd.Parameters.Add (":d", quantity);
      cmd.Parameters.Add (":a", price);
      cmd.Parameters.Add (":p", product_image);

      //da.InsertCommand = cmd;
      int i = cmd.ExecuteNonQuery ();

      return i;
    }
  }
}

```

I changed your code to benefit from `using(var orc = new OracleConnection()) { .... }`-pattern with IDisposables - it auto-close/disposes your connection (same for command) on leaving the scope.

---

Edited due to comment by [Wernfried-Domscheit](https://stackoverflow.com/users/3027266/wernfried-domscheit):

Oracle needs `:` (`@` is for SqlServer) - this answer [how-to-write-parameterized-oracle-insert-query](https://stackoverflow.com/questions/12812634/how-to-write-parameterized-oracle-insert-query) supports it - it even uses parameter names without `:` - so perhaps parameternames are just inserted by "order" instead of "by name"
You have two options for saving an image to your DB:

1. Convert your image to Base64 and save the output string to your DB
2. Save your image as a file on your server and save the path of this image to your DB (Recommended)