Oracle ORA-12704: character set mismatch after upgrade from Beta 2

Rate It (1)

Last post 10-22-2009 9:01 AM by SreejithC. 7 replies.

Sort Posts:

  • Oracle ORA-12704: character set mismatch after upgrade from Beta 2

    01-27-2006, 8:47 AM
    • Participant
      1,266 point Participant
    • mhariri
    • Member since 11-15-2004, 8:35 PM
    • Posts 502

    Hi,

    I am starting to get the following error when I try to insert or update into an Oracle 8i database after I upgraded to production version of ASP.Net 2.0! Something with the character set but I am not sure. Same application server works fine with Oracle 10G. How do you force a character set when sending queries to database servers in ASP.Net ?

    ORA-12704: character set mismatch

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.OracleClient.OracleException: ORA-12704: character set mismatch


    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [OracleException (0x80131938): ORA-12704: character set mismatch
    ]
       System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc) +204
       System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals) +1024
       System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal(Boolean needRowid, OciRowidDescriptor& rowidDescriptor) +447
       System.Data.OracleClient.OracleCommand.ExecuteNonQuery() +108
       System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand command, DataSourceOperation operation) +401
       System.Web.UI.WebControls.SqlDataSourceView.ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues) +721
       System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +78
       System.Web.UI.WebControls.GridView.HandleUpdate(GridViewRow row, Int32 rowIndex, Boolean causesValidation) +1215
       System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +858
       System.Web.UI.WebControls.GridView.RaisePostBackEvent(String eventArgument) +199
       System.Web.UI.WebControls.GridView.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +174
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

  • Re: Oracle ORA-12704: character set mismatch after upgrade from Beta 2

    01-28-2006, 3:04 PM
    • Member
      75 point Member
    • dmclennan
    • Member since 08-07-2005, 4:49 PM
    • Posts 16

    Hi,

    I have the same problem, though this occurs when adding the WHERE clause to the SqlDataSource.  I've tried various combinatations  with and without quotes, single vs. double quotes, etc.  If I remove the where clause and the SelectParameter, the query returns all rows.  

    Thanks,

    Don

    <asp:SqlDataSource ID="SqlDataSourceUsers" runat="server" ConnectionString="<%$ ConnectionStrings:X %>"
    ProviderName="<%$ ConnectionStrings:X.ProviderName %>"
    SelectCommand='SELECT "USER_ID", "USER_NAME","LOGIN" FROM "USERS" WHERE ("LOGIN" = :LOGIN)'
    CancelSelectOnNullParameter="False" >
    <SelectParameters>
    <asp:ControlParameter ControlID="TextBoxSearch" Name="LOGIN" PropertyName="Text" Type="String" />
    </SelectParameters>
    </asp:SqlDataSource>

     

  • Re: Oracle ORA-12704: character set mismatch after upgrade from Beta 2

    02-01-2006, 2:34 PM
    • Participant
      1,266 point Participant
    • mhariri
    • Member since 11-15-2004, 8:35 PM
    • Posts 502

    Hi,

     

    After spending about five hours on microsoft we discovered that you should change the parameter type to "Empty". Some how it does not like the type "String" with Oracle 8i and certain version of Oracle 9i. I hope this helps.

     

    Mo

     

  • Re: Oracle ORA-12704: character set mismatch after upgrade from Beta 2

    02-01-2006, 10:24 PM
    • Member
      75 point Member
    • dmclennan
    • Member since 08-07-2005, 4:49 PM
    • Posts 16

     Mo,

    This suggestion works great!  Thank you very much.

    Don

  • Re: Oracle ORA-12704: character set mismatch after upgrade from Beta 2

    02-15-2006, 12:07 PM
    • Member
      15 point Member
    • aneesh01
    • Member since 02-05-2006, 7:33 PM
    • Posts 3
    Mo, it doesn't work for me. I tried using both "Empty" as well as other types like "Object" and even removing the Type parameter from the query! It still doesn't work.

    Anybody with any suggestions, please drop me a line. Here is the code:

            <asp:SqlDataSource ID="PharmacyLocator" runat="server" ConnectionString="<%$ ConnectionStrings:X %>"
                ProviderName="<%$ ConnectionStrings:X.ProviderName %>"
                SelectCommand="SELECT PHRMNAME, PHRMSTADDRESS, PHRMCITY FROM PHARMACY FP WHERE  (PHRMZIP = :ZIPCODE))" EnableCaching="True">
                <SelectParameters>
                    <asp:ControlParameter ControlID="txtZipCode" Name="ZIPCODE" PropertyName="Text" Type="String"/>
                </SelectParameters>
            </asp:SqlDataSource>


  • Re: Oracle ORA-12704: character set mismatch after upgrade from Beta 2

    03-18-2006, 5:19 AM
    • Member
      5 point Member
    • Dobby
    • Member since 03-18-2006, 10:15 AM
    • Posts 1

    Hi ,

    I experienced that error and worked around by choosing the varchar2 type instead of nvarchar2 for the columns queried.

    Have a nice weekend,

    Dobby

  • Re: Oracle ORA-12704: character set mismatch after upgrade from Beta 2

    11-22-2006, 2:51 PM
    • Member
      5 point Member
    • Pylons22
    • Member since 11-22-2006, 7:48 PM
    • Posts 1

    Yeah, your "Empty" suggestion totally helped me too. 

    I'm using a full recent copy of VS2005 and I'm getting the same issues when I try to use a Sql DataSource with an Oracle 8i database.

     

  • Re: Oracle ORA-12704: character set mismatch after upgrade from Beta 2

    10-22-2009, 9:01 AM
    • Member
      2 point Member
    • SreejithC
    • Member since 10-22-2009, 7:31 AM
    • Posts 1

    It worked like a magic for me too..  Thanks for the graet help.

    But i think changing to "Empty" is illogical as my field is actually text. Hope Microsoft will look into it.

     

    Sreejith C

Page 1 of 1 (8 items)