My question is simple like the title says. We are not allowed to create stored procedures. So I want to make this via dynamic query (non of any custom types creation, etc.).
It should be so simple as:
command.CommandText =
"INSERT INTO XXX.privileges VALUES (" +
":in_role_type," +
":in_who," +
":in_action_type," +
":in_privilege_type," +
":in_object_type," +
":in_keys)"
Where all parameters are scalar values, but in_keys is an array of integers.
I've tried this approach:
And the error is below:
Unable to cast object of type 'System.Int32' to type 'System.Array'