![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
All: I'm attempting to write a value into a Blob. The database is Oracle 8.0.6, and I've installed the ODAC 9.2.0.7.0. I'm calling this from an ASP.Net v1.1 web service. Here is the table definition: TABLE_X_ATTACHMENTS_STAGE ( OBJID NUMBER, CASE_ID VARCHAR2 (30) NOT NULL, SITE_ID VARCHAR2 (30) NOT NULL, FILE_NAME VARCHAR2 (512), CONTENTS BLOB ) Here's the code: string sqlAttachmentCmd = @"insert into sa.table_x_attachments_stage " + "(objid, case_id, site_id, file_name, contents) " + "values (3, :case_id, :site_id, :file_name, :contents)" ; byte [] contentsByteArr = Convert.FromBase64String(attachment.contents); int retVal = 0; conn=new OracleConnection(connstr); conn.Open(); OracleParameter caseIDParameter = new OracleParameter("case_id",caseID); OracleParameter siteIDParameter = new OracleParameter("site_id",siteID); OracleParameter fileNameParameter = new OracleParameter("file_name",attachment.fileName); OracleParameter blobParameter = new OracleParameter("contents",OracleDbType.Blob); blobParameter.Value = contentsByteArr; cmnd=new OracleCommand(sqlAttachmentCmd,conn); cmnd.Parameters.Add(caseIDParameter); cmnd.Parameters.Add(siteIDParameter); cmnd.Parameters.Add(fileNameParameter); cmnd.Parameters.Add(blobParameter); retVal = cmnd.ExecuteNonQuery(); And here's the exception I'm receiving: CaseAttachment(): Error Number=-3016 => - Oracle Data Provider for .NET Oracle.DataAccess.Client.OracleException at Oracle.DataAccess.Client.OracleException.GetOpoErr (IntPtr opsErrCtx, Int32 arrayBindIndex, String dataSrc, String procedure) at Oracle.DataAccess.Client.OracleException.GetOpoErr Ctx(IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, IntPtr opsConCtx, String dataSrc, String procedure) at Oracle.DataAccess.Client.OracleException.HandleErr orHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure) at Oracle.DataAccess.Types.OracleBlob.CreateTempLob() at Oracle.DataAccess.Types.OracleBlob.Write(Byte[] buffer, Int32 offset, Int32 count) at Oracle.DataAccess.Client.OracleParameter.PreBind_B lob(OracleConnection conn) at Oracle.DataAccess.Client.OracleParameter.PreBind(O racleConnection conn, IntPtr errCtx, Int32 arraySize) at Oracle.DataAccess.Client.OracleCommand.ExecuteNonQ uery() I'm at a loss as to the cause. Suggestions? And what do you think the error signifies? |
#3
| |||
| |||
|
|
And what do you think the error signifies? |
#4
| |||
| |||
|
|
Frank van Bortel wrote: And what do you think the error signifies? Hi Frank: I really have no idea - thus is why I've posted to this group. I have since discovered that the same code works fine on a Oracle 9.2 DB. Thus, I suspect that it has something to do against the age/version of the DB (it's 8.0.6, remember). Does anyone know if there's a version 8 of ODP.Net? I "oldest" I could locate was 9.2. Thanks for replying Frank! It's all documented: |
![]() |
| Thread Tools | |
| Display Modes | |
| |