i'm trying to send an array of bytes[] as PgSqlType.ByteA to a stored function.
Code: Select all
byte[][] positions = new byte[10][];
// filling positions - 2.Dimension is of variable length
using (PgSqlCommand command = CreateCommand(tx))
{
command.CommandType = CommandType.StoredProcedure;
command.CommandText = @"MyProc";
command.Parameters.Add("@param", PgSqlType.Array).Value = new PgSqlArray(positions, PgSqlType.ByteA, 1, positions.Length);
command.ExecuteNonQuery();
}
Exception on ExecuteNonQuery(). I have no problem doing the same with Varchar, Int, BigInt etc. Did i hit a limitation of the Array Type or am i doing something wrong?Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.
Ralf