How do you insert 9 MB file into a Blob Field Using Oracle.DataAccess?
Posted
by discwiz
on Stack Overflow
See other posts from Stack Overflow
or by discwiz
Published on 2010-05-14T18:11:20Z
Indexed on
2010/05/14
18:14 UTC
Read the original article
Hit count: 338
Trying to insert a large audio file into an Oracle 10g database and keep getting this error:
ORA-01460: unimplemented or unreasonable conversion requested
The byte array length of the audio file is 2702577. The procedure works with smaller array lengths, but not the larger ones.
Here is my code and Thanks!
Dim oracleConnection As New OracleClient.OracleConnection
Dim Cmd As New OracleClient.OracleCommand
Dim oracleDataAdapter As New OracleDataAdapter
oracleConnection.ConnectionString = System.Configuration.ConfigurationManager.AppSettings("MasterConnectionODT")
Cmd.Connection = oracleConnection
Cmd.CommandText = "Audio.ADD_AUDIO"
Cmd.CommandType = CommandType.StoredProcedure
Dim aParam As New OracleClient.OracleParameter
aParam.ParameterName = "I_FACILITY_ID_C"
aParam.OracleType = OracleType.Char
aParam.Value = FacID
aParam.Direction = ParameterDirection.Input
Cmd.Parameters.Add(aParam)
aParam = New OracleParameter
aParam.ParameterName = "I_TARP_ID_N"
aParam.OracleType = OracleType.Number
aParam.Value = TarpID
aParam.Direction = ParameterDirection.Input
Cmd.Parameters.Add(aParam)
aParam = New OracleParameter
aParam.ParameterName = "I_AUDIO_BLOB"
aParam.OracleType = OracleType.Blob
aParam.Value = Audio
aParam.Direction = ParameterDirection.Input
Cmd.Parameters.Add(aParam)
Using oracleConnection
oracleConnection.Open()
Cmd.ExecuteNonQuery()
End Using
© Stack Overflow or respective owner