locked
ORA-01460: unimplemented or unreasonable conversion requested RRS feed

  • Question

  • User-1460795471 posted

    Hi,

    i am trying to upload files to database. I am successfull in uploading documents, txt files, pdf files which are very small in size say 25 kb. But, whenever i try uploading bigger files, i get a error "ORA-01460: unimplemented or unreasonable conversion requested ". Between, i use a stored  procedure to upload file, where in blob datatype is used for file content in oracle. Feels like i am out of path somewhere, Please help.


                    oracleCon = DLORACLEConnectionObject();
                    oracleCon.Open();

                    Stream FileStream = flObject.PostedFile.InputStream;
                    custFileSize = flObject.PostedFile.ContentLength;
                    strCustContentType = flObject.PostedFile.ContentType;
                    strCustFileName = Path.GetFileName(flObject.PostedFile.FileName);


                    Byte[] FileContent = new byte[custFileSize];
                    int intStatus;
                    intStatus = FileStream.Read(FileContent, 0, custFileSize);

                    object objFileContent = FileContent;

                    OracleCommand cmd = new OracleCommand();

                    cmd.CommandText = "InsertCustReqDetails";

                    OracleParameter param1 = cmd.Parameters.Add("FILENAME", OracleType.VarChar);
                    param1.Value = strCustFileName;
                    param1.Direction = ParameterDirection.Input;

                    OracleParameter param2 = cmd.Parameters.Add("FILECONTENT", OracleType.Blob);
                    param2.Value = FileContent;
                    param2.Direction = ParameterDirection.Input;

                    OracleParameter param3 = cmd.Parameters.Add("LETTERENDDATE", OracleType.DateTime);
                    param3.Value = strCustLetterEndDate;
                    param3.Direction = ParameterDirection.Input;

                    OracleParameter param4 = cmd.Parameters.Add("LETTERSTARTDATE", OracleType.DateTime);
                    param4.Value = strCustLetterStartDate;
                    param4.Direction = ParameterDirection.Input;

                    OracleParameter param5 = cmd.Parameters.Add("UPLOADEDDATE", OracleType.DateTime);
                    param5.Value = strCurrentDate;
                    param5.Direction = ParameterDirection.Input;

                    OracleParameter param6 = cmd.Parameters.Add("NOSLOTS", OracleType.Number);
                    param6.Value = custLetterSlotsNo;
                    param6.Direction = ParameterDirection.Input;

                    OracleParameter param7 = cmd.Parameters.Add("INDIVGROUP", OracleType.VarChar);
                    param7.Value = strCustIndividualGroup;
                    param7.Direction = ParameterDirection.Input;

                    OracleParameter param8 = cmd.Parameters.Add("INDIVEMPNO", OracleType.Number);
                    param8.Value = individualEmpno;
                    param8.Direction = ParameterDirection.Input;

                    OracleParameter param9 = cmd.Parameters.Add("LETTERCODE", OracleType.VarChar);
                    param9.Value = strLetterCode;
                    param9.Direction = ParameterDirection.Input;

                    OracleParameter param10 = cmd.Parameters.Add("CUST_CODE", OracleType.VarChar);
                    param10.Value = strCustomerCode;
                    param10.Direction = ParameterDirection.Input;

                    OracleParameter param11 = cmd.Parameters.Add("CUST_NAME", OracleType.VarChar);
                    param11.Value = strCustomerName;
                    param11.Direction = ParameterDirection.Input;

                    OracleParameter param12 = cmd.Parameters.Add("CUST_PROFILE", OracleType.VarChar);
                    param12.Value = strCustomerProfile;
                    param12.Direction = ParameterDirection.Input;

                    OracleParameter param13 = cmd.Parameters.Add("COUNTRY_CODE", OracleType.VarChar);
                    param13.Value = strCountryCode;
                    param13.Direction = ParameterDirection.Input;

                    OracleParameter param14 = cmd.Parameters.Add("COUNTRY", OracleType.VarChar);
                    param14.Value = strCountryName;
                    param14.Direction = ParameterDirection.Input;

                    OracleParameter param15 = cmd.Parameters.Add("REQUESTOR_FK", OracleType.Number);
                    param15.Value = custUploaderEmpNo;
                    param15.Direction = ParameterDirection.Input;

                    OracleParameter param16 = cmd.Parameters.Add("DEPT_NAME", OracleType.VarChar);
                    param16.Value = strDepartmentName;
                    param16.Direction = ParameterDirection.Input;

                    OracleParameter param17 = cmd.Parameters.Add("VERTICAL_NAME", OracleType.VarChar);
                    param17.Value = strVerticalName;
                    param17.Direction = ParameterDirection.Input;

                    OracleParameter param18 = cmd.Parameters.Add("SUPERVISOR_NAME", OracleType.VarChar);
                    param18.Value = strSupervisorName;
                    param18.Direction = ParameterDirection.Input;

                    OracleParameter param19 = cmd.Parameters.Add("VERTICALHEAD_NAME", OracleType.VarChar);
                    param19.Value = strVHName;
                    param19.Direction = ParameterDirection.Input;

                    OracleParameter param20 = cmd.Parameters.Add("BUSSUNIT_NAME", OracleType.VarChar);
                    param20.Value = strBUName;
                    param20.Direction = ParameterDirection.Input;

                    OracleParameter param21 = cmd.Parameters.Add("STATUS", OracleType.VarChar);
                    param21.Value = procStatus;
                    param21.Direction = ParameterDirection.Input;

                    OracleParameter param22 = cmd.Parameters.Add("FILESIZE", OracleType.VarChar);
                    param22.Value = custFileSize;
                    param22.Direction = ParameterDirection.Input;

                    OracleParameter param23 = cmd.Parameters.Add("FILECONTENTTYPE", OracleType.VarChar);
                    param23.Value = strCustContentType;
                    param23.Direction = ParameterDirection.Input;

                    OracleParameter param24 = cmd.Parameters.Add("REMARKS", OracleType.VarChar);
                    param24.Value = strRemarks;
                    param24.Direction = ParameterDirection.Input;

                    OracleParameter param25 = cmd.Parameters.Add("RequestID", OracleType.Number);
                    param25.Value = RequestID;
                    param25.Direction = ParameterDirection.InputOutput;
                   cmd.Connection = oracleCon;

                    cmd.CommandType = CommandType.StoredProcedure;

                    cmd.ExecuteNonQuery();

                    RequestID = Convert.ToInt32(param25.Value);

     

    Friday, March 23, 2007 3:03 AM

Answers

  • User1917047975 posted

    There is actually a number of reasons why you are experiencing this problem... some as obscure as "trying to load Cyrillic data with CL8WMWIN1251 as the NLS_LANG into a database set up as UTF8 language code" while other problems are as simple as loading data through a stored procedure is limited to the PLSQL limitation of 32KB for the size of data coming in as a parameter.  I'm guessing the latter might be your problem... [;)]

     
    However, depending on how you are accessing the database (not sure since you are using your own(?) Oracle connection object), you may have other options available... try this page: (http://www.oracle.com/technology/oramag/oracle/05-nov/o65odpnet.html) but this would require using Oracle's ODP.NET adapter.

     

    Hope this helps! 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 10, 2007 4:13 PM