I want to insert string to oracle database as clob data type in c#. How can I do this? some codes for example:
private static byte[] GetByteArr(string listParameter)
{
if (listParameter!=null)
{
return Encoding.Unicode.GetBytes(listParameter);
}
else
{
return Encoding.Unicode.GetBytes(string.Empty);
}
}
byte[] toArr = GetByteArr((string)eMessageList[1]);
emailParameters[1] = command.Parameters.Add("pEto",OracleDbType.Clob, toArr,ParameterDirection.Input);
command.ExecuteNonQuery();
this code insert toArr to database as System.Byte[].
char[], but not abyte[]... Additionally, you haven't said anything about what happens with the code you've already provided.