I'm new in the Oracle world, and i'm trying to make a insert from .NET (C#) using a parametrized query.
My table is:
CREATE TABLE layer_mapping
(
lm_id NUMBER NOT NULL,
lm_layer_name VARCHAR2(50) NOT NULL,
lm_layer_file LONG RAW NOT NULL,
CONSTRAINT lm_pk PRIMARY KEY(lm_id)
)
"INSERT INTO layer_mapping VALUES (:lm_id,:lm_layer_name,:lm_layer_file);"
In Visual Studio the query above is being generated on runtime, and I have BindByName = true;
The "lm_layer_file" value, where i suspect the error is, is being fed to a class from a file, and it is a byte array. Below is a example of the class.
public class LayerMapping()
{
private Int32 _id;
private String _name;
private Byte[] _file;
}
The weird thing is that with PostgreSQL everything occurs normaly without errors.
Am i using the wrong methods to generate my long raw values?
Oh, the error that i'm receiving is ORA-0991 (invalid char).
Any thoughts?