.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

show data in grid view error Arithmetic operation resulted in an overflow.

Posted By:      Posted Date: August 24, 2010    Points: 0   Category :ASP.Net
 

sir

i have a table there is 17 columns in 17 column 3 are number and other are varchar . when i try to display all data of that column error occures.

one more intersting think is when i try to display 6 column then grid show there data an no more error occures. 

when i run my project this error occures in grid view

Arithmetic operation resulted in an overflow. 




View Complete Post


More Related Resource Links

SQL 2008 installation gives Arithmetic operation resulted in an overflow error

  
I installed SQL 2008 Express on 64 bit Windows 7 Professional. During this standard installation I got an error installing Reporting Services. Now I cannot uninstall Reporting Services as I always get 'Arithmetic operation resulted in an overflow' error and the uninstall program fails. I have tried uninstalling all of SQL 2008 and just the Reporting Service but always get this same error. BTW I have been using the Control Panel program to uninstall.

I have also tried doing a repair to SQL 2008 but it will not fix Reporting Services. I tried installing SP1 but it says that it will not run because SQL 2008 Express did not get installed correctly and so it aborts. Frustrating !

I have 2 computers and installing on the 2nd computer WITHOUT Reporting Services worked okay. Then installing SP1 was okay on the 2nd machine. Then yesterday I bought SQL 2008 Developer edition, removed successfully SQL 2008 Express on 2nd machine, installed the new Developer edition WITH Reporting Services and bang! There it is... the Arithmetic error, and now on my 2nd machine I am also unable to remove Reporting Services. So.. both machines are down with the same error.

Clues: I am running IIS 7 on both machines and also ColdFusion. I have tried stopping and disabling IIS too.

Upgrade to 4.0 - "Arithmetic operation resulted in an overflow Error" - MySQL driver issue

  

I upgraded to 4.0 and I'm now getting "Arithmetic operation resulted in an overflow Error" whenever I try to call information from the database. I'm using MySQL ODBC 5.1 for the site.

When I first started getting the error I could only return integer values and was using the connection string:

Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=myDataBase;User=myUsername;Password=myPassword;Option=

Arithmetic overflow error converting expression to data type smallint

  
Can anyone tell me what exactly this means? Arithmetic overflow error converting expression to data type smallint. 

arithmetic operation resulted in an overflow

  

I do not understand how this problem happens, and I need help.  The code below is very simple.  It collects data entered into controls; instantiates a class; then sends the data to a class method for processing.  No resulting value is returned to this code.

You can see that there are no areithmetic operations performed on the data, but I sometimes get the error "arithmetic operation resulted in an overflow" right here on the last line cRating.SetRating(etc...).

    Protected Sub btnSetRating_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSetRating.Click

        Dim cRating As Rating = New Rating
        Dim dMatchDate As DateTime
        Dim sType As String
        Dim iSetID As Integer
        Dim iHPlayerID As Integer
        Dim iAPlayerID As Integer
        Dim iHTableRun As Byte
        Dim iATableRun As Byte
        Dim iH8Break As Byte
        Dim iA8Break As Byte
        Dim iHe8s8 As Byte
        Dim iAe8s8 As Byte
        Dim iH15BRn As Byte
        Dim iA15BRn As Byte
        Dim iHwins As Byte
        Dim iAwins As Byte

        dMatchDate = Calendar1.SelectedDate
        sType = ddlType.SelectedValue
        iSetID = txtSet.Text
        iHPlayerID = txtHomePid.Text
        iAPlayerID = txtAwayPid.Text
        iHTableRun = txt0H_runs.Text
        iATableRun = txt0A_runs.Tex

arithmetic operation resulted in an overflow

  

I do not understand how this problem happens, and I need help.  The code below is very simple.  It collects data entered into controls; instantiates a class; then sends the data to a class method for processing.  No resulting value is returned to this code.

You can see that there are no areithmetic operations performed on the data, but I sometimes get the error "arithmetic operation resulted in an overflow" right here on the last line cRating.SetRating(etc...).

    Protected Sub btnSetRating_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSetRating.Click

        Dim cRating As Rating = New Rating
        Dim dMatchDate As DateTime
        Dim sType As String
        Dim iSetID As Integer
        Dim iHPlayerID As Integer
        Dim iAPlayerID As Integer
        Dim iHTableRun As Byte
        Dim iATableRun As Byte
        Dim iH8Break As Byte
        Dim iA8Break As Byte
        Dim iHe8s8 As Byte
        Dim iAe8s8 As Byte
        Dim iH15BRn As Byte
        Dim iA15BRn As Byte
        Dim iHwins As Byte
        Dim iAwins As Byte

        dMatchDate = Calendar1.SelectedDate
        sType = ddlType.SelectedValue
        iSetID = txtSet.Text
        iHPlayerID = txtHomePid.Text
        iAPlayerID = txtAwayPid.Text
        iHTableRun = txt0H_runs.Text
        iATableRun = txt0A_runs.Tex

Arithmetic overflow error converting expression to data type int.

  

I have a table with a row called row1, this row1 is a bigint and has values from 0  To  4278190080

 

I am running a query such as: select top 1 * from tableA where row1 <= (((73*256+62)*256+53)*256 + 12)

 

How can I get this to work? I tried to do where cast(row1 as float) <= ....... but I get the same error.



Data Source View Gives incorrect Error--Different Data Type

  
Hi, I'm creating a report model (2008 R2).  I am trying to create a relationship between two tables.  One FKs to another--same name and type (tinyint) columns.  But the Data Source View editor doesn't allow this, giving the message "...source and destination column have different data types".  But the columns are the same types.  I ahd this once before  acouple of years ago and don't remember how I got around it. Does anyong have ideas?  

Expand rows in a data grid to show details in the same page

  
<asp:templatecolumn headertext="Purchase Order"> <headerstyle horizontalalign="center"></headerstyle> <itemstyle horizontalalign="center"></itemstyle> <itemtemplate> <%# DataBinder.Eval(Container.DataItem, "PurchaseOrder") %> </itemtemplate> </asp:templatecolumn> <asp:templatecolumn headertext="Order"> <headerstyle horizontalalign="center"></headerstyle> <itemstyle horizontalalign="center"></itemstyle> <itemtemplate> <a href="OrderDetail.aspx?Order=<%# DataBinder.Eval(Container.DataItem, "OrderNumber")%>"> <%# DataBinder.Eval(Container.DataItem, "OrderNumber") %> </a> </itemtemplate> </asp:templatecolumn> <asp:templatecolumn headertext="Ack Date"> <headerstyle horizontalalign="center"></headerstyle> <itemstyle horizontalalign="center"></itemstyle> <itemtemplate> <%# DataBinder.Eval(Container.DataItem, "AcknowledgeDate") %> </itemtemplate> </asp:templ

Grid view update error

  
Server Error in '/WebSite6' Application. Object reference not set to an instance of an object. 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.NullReferenceException: Object reference not set to an instance of an object. Source Error: The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:1. Add a "Debug=true" directive at the top of the file that generated the error. Example:   <%@ Page Language="C#" Debug="true" %>or:2) Add the following section to the configuration file of your application:<configuration>    <system.web>        <compilation debug="true"/>    </system.web></configuration> Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.Important: Running applicatio

My Grid Don't show the data

  
Hi Dear I have one gridview . and sometimes I face with this error that it cannot show the data bound to it .. I use myGrid.Datasource= .. nad myGrid.DataBind() wherever it is needed .. what is the the problem ?

Unable to store combo box value to data grid view control

  
Hello,         I am using fw 3.5 SP1 with VS2008. I have bind my object collection with data grid view. I can see different values in combo box inside data grid view. But when I select any one value from combo box the selected value is changed to first value of combo box as soos as user leave the cell of the gird. Can anyone tell me where should I look for this problem so that my selected value remains same as user did select it.   Nilkanth Desai  

Help to resolve an error "The conversion of a char data type to a datetime data type resulted in an

  
Why am I getting an error when executing this: select convert(datetime, '2010-09-12T18:11:48', 120) The message is: "Msg 242, Level 16, State 3, Line 1 The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value." I don’t get the error if I remove “T” from the string. But I need it to work with “T”.

Problem of data grid view of xml file

  
Dear Friends I have a problem with XML View Data Grid. Earlier I create .xml file, then type first set of data tags then Right Click on it and select View Data Grid and Visual Studio 2005 gives me nice data grid view where I can able to enter data. But in Visual Studio 2008 I am not able to find that option. So friends kindly tell me how to enter data with data grid in xml file? I am using ASP.net with  C#, Visual Studio 2008, XML file for createing data source. Thank you.

Data View that handles both a Filter and "Show All"

  

I had a nice search facility up and running that filtered SQL data displayed in a Data View via a "contains" Filter clause on an entered string.

Pesky users now request a "Show All" button as well to display all data in the Data View.  For the life of me I cannot get this up and running - anybody got a tip/pointer?  I can't figure a combination of Filter criteria that would allow this.

thanks

Ritchie

 


Arithmetic overflow error

  

hi all,

While executing select statement for a table then iam getting arithmetic overflow error.I found that retrieviing the data for a particular column showed that error ,sum() for that column is showing error.Is there any way i can rectify this problem.PLZ HELP ME.

thanks in advance


unable to update data to databse from grid view

  

I have two tables in my database

using "innerconnect" i have show table content in grid view as      INV_NO            INV_DT        DN_NO       DN_DT   LR_NO        LR_DT .

where LR_NO is null .

I want to update it from grid view plz help




TABLES









here  DN_NO  and INV_NO are primary keys

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace amar
{
    public partial class Form2 : Form
    {
        SqlConnection con;
        SqlDataAdapter da1,da2;
        SqlCommandBuilder cb;
    &nb

Need help on Select button column in Data Grid to populate fields in Form View

  

 When I have a select a row in a Data Grid that when I click on it I want it to show the info for the person I selected in a form view on the same page as the Data Grid. Here are the columns for the Data Grid that I have set up, the column is highlighted:

<asp:DataGrid ID="MHGrid" AutoGenerateColumns="False"  
        DataSourceID="MHFoundation" DataKeyField="POPULATION_LIST_ID" 
        AllowPaging="True" AllowSorting="True" BorderStyle="Solid" 
        BorderColor="#999999" BorderWidth="3px" CellPadding="4" PageSize="4" 
        CellSpacing="2" runat="server" BackColor="Gray" Font-Bold="False" 
        Font-Italic="False" Font-Overline="False" Font-Strikeout="False" 
        Font-Underline="False">
        <SelectedItemStyle BackColor="#FF9900" Font-Bold="False" Font-Italic="False" 
            Font-Overline="False" Font-Strikeout="False" Font-Underline="False" />
        <Columns>
            <asp:ButtonColumn CommandName="Select"  Text="Select"></asp:ButtonColumn>
            
            <asp:BoundColumn D
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend