OLEDB - Data value could not be converted for reasons other than sign mismatch or data overflow. RRS feed

  • Question

  •  using (OleDbCommand cmd = new OleDbCommand("INSERT_SEARCHING", conn))
                        cmd.CommandType = System.Data.CommandType.StoredProcedure;
                        OleDbParameter VIP = cmd.Parameters.Add("V_USERID", OleDbType.Integer);
                        VIP.Direction = ParameterDirection.Input;
                        VIP.Value = id;
                        OleDbParameter VUS = cmd.Parameters.Add("V_TYPE", OleDbType.Integer);
                        VUS.Direction = ParameterDirection.Input;
                        VUS.Value = type;
                        OleDbParameter VSTA = cmd.Parameters.Add("V_ITEM", OleDbType.VarWChar);
                        VSTA.Direction = ParameterDirection.Input;
                        VSTA.Value = item;

    In my stored procedure i have three parameters. First and second is integer. But third is string and it could cantain Special Characters like "Ə Ğ Ö Ü" . App is throwing this exception while item string has at least  one of these characters.

    " Data value could not be converted for reasons other than sign mismatch or data overflow."

    Database is Oracle. But there is not any problem in database. Because i have tested it with ODP.NET and there was not any problem. But now i must use OLEDB.


    Ferhad Jabiyev

    Tuesday, July 10, 2012 11:00 AM


  • As it is working with i belive it is OLEDB compatible issue with Oracle database for ASCI code.

    To make OraOLEDB compatible with OLE DB .NET Data Provider, You need to add OLEDB.NET=True to the connection string as below,

    ConnectionString = 
    User Id=scott;
    Data Source=Oracle;

    Lingaraj Mishra

    Tuesday, July 10, 2012 11:24 AM