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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Expression evaluation caused an overflow error when calling ExecuteResultSet(SqlServerCe.ResultSetOp

Posted By:      Posted Date: September 04, 2010    Points: 0   Category :Sql Server
HelloWhen I call ExecuteResultSet(SqlServerCe.ResultSetOptions.Scrollable) I am getting the following error when the data type is Numeric(18, 4):Expression evaluation caused an overflow. [ Name of function (if known) =  ]The numbers involved are not that big and work fine when ExecuteReader() or ExecuteResultSet(SqlServerCe.ResultSetOptions.None) are called on the same SQL.Any ideas? Thanks in advance!Cheers,DaveCode:Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click        Dim errorDescription As String = String.Empty        Dim numericNumber As String = String.Empty        Try            Using sqlCE As New System.Data.SqlServerCe.SqlCeConnection("Data Source = '" & My.Application.Info.DirectoryPath & "\MyDatabase.sdf';")                sqlCE.Open()                Dim sqlCECommand As SqlServerCe.SqlCeCommand = sqlCE.CreateCommand()                sqlCECommand.CommandText = "SELECT SUM(MT.TPM_Measure1) AS CurrentAmount FROM BUS_Table MT"                System.Diagnostics.Debug.WriteLine(sqlCECommand.CommandText)                Dim reader As System.Data.IDataReader = Nothing                If RadioButton1.Checked Then                    reader = sqlCECommand.ExecuteReader() 'Works fine                ElseIf RadioButton2.Checked Then                    reader = sqlCECommand.ExecuteRe

View Complete Post

More Related Resource Links

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 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.

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



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. 

Syntax error (missing operator) in query expression

Good Day Gurus!

I have a Excel user application which has a user form (named 'Registo') that displays criteria and an image that has been entered in it's corresponding spreadsheet. This works the way it should.  There's also the ability to search the spreadsheet via a form (by clicking 'Pesquisar' button) this opens a search form. However, I having a bit of a problem with it. When I try to search for something it basically doesn't do anything at all. It just sits there. So I tried to debug it and I think I'm having a problem with either the JET db engine or somethign with teh query or maybe I don't have the correct reference.

I 'borrowed' this Excel application from another forum because it's exactly what I'm looking for! However, I suck at vb.

So I was hoping somebody could take a look at the code and see if I'm missing something?  I'm kinda' desparate to get this working because I'm been trying to figure it out for days and I'm running out of time.  Cry
Option Explicit

'constantes para auxiliar na verificação do código
Private Const Ascendente As Byte = 0

syntax error in calling mailhelper class??


I use to program with VB.NEt. I am just learning C#.  I need to learn C# b/c I am a SharePoint developer and Admin and thats what SharePoint is coded from.


so I am trying to create a simple form that sends an email but am getting an error with calling this function:

       mailHelper.SendMailMessage("admin@pointeightpower.com", "jstevens@pointeightpower.com", null, null, "August Heat Stress", String.Concat(txtSupervisorName.Text.Trim, "reviewed this month's training on ", System.DateTime.Now));


it says param string has some invalid arguements. I dont know why. it works in VB.Net. any help? Thanks

Error calling WCF service that is returning list.".Debugging resource strings are unavailable ......

Ok.this is just making me frustrated... Here is step by step of what I am trying to do (& not able to) 1. I am calling WCF service hosted in a SharePoint 2010 site from a silverlight app in same domain (So no cross doman I guess). 2. I use Linq to Sharepoint for querying the DB. 3. I am having a list "machines" in Sharepoint 2010 that is having a lookup column from Other list called "part" 4. My WCF method GetAllMachines() works perfectly well when it skips the lookup column "partname" & returns List of type machineitem. 5. But problem occurs when I add machineitemobject.parts.partsname in my Linq to Sharepoint query . My service gives the error not found Async_ExceptionOccurred] Arguments: Debugging resource strings are unavailable." 6. Note that return type of my Method is List<machinesitem> 7. The point to note here is that I use SPMETAL tool to generate the LINQ class that maps the lists . So When I try to query the lookup column it tries to add List item of the type class & that is what causing the error. Is it because I am not using datacontract in my service (but it returns the strings & all private members of machines list e.g. name,title etc) Is it making the attribute Serialisable will solve the error ??? I am kind of lost in it ...Plss help!!   Thanks

xmldatasource and xpath expression evaluation

Hi, I am working with XMLdatasource and trying to consume a XML file. Now problem is there are scenarios when a link is not available in the xml file. Like in the e.g. below: <a href='<%# XPath("link") %>' >  </a>  say "link" can or cannot be there in the file. Now when "link" is missing, this expression throws exception. How can I handle this exception so that it continues loading page normally or can I check "link" existence somehow? Thanks.

Error calling sharepoint web services from .net 3.5 WCF client...

Code Snippet                 using (OCUserProfileService.UserProfileServiceSoapClient service =                     new TestAndDestroy.OCUserProfileService.UserProfileServiceSoapClient(GetWcfBinding())) {                     service.ClientCredentials.Windows.AllowedImpersonationLevel = TokenImpersonationLevel.Impersonation;                                     PropertyData[] properties = service.GetUserProfileByName("domain\\user.name");                     foreach (PropertyData p in properties) {                        Console.WriteLine(p.Name);                        Console.WriteLine(p.Values);                    }       produces....The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://microsoft.com/webservices/SharePointPortalServer/UserProfileService:GetUserProfileByNameResponse. The InnerException message was 'Error in line 1 position 392. 'Element' 'IsPrivacyChanged' from namespace 'http://microsoft.com/webservices/SharePointPortalServer/UserProfileService' is not expected. Expecting element 'Name | Privacy'.'.  Please see InnerException for more details.   I'm totally stumped, any ideas???

Error handling on Connection Manager Expression

I am using a connection manager with an expression to set the connection string. (see my question http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/1ea71f9a-df5c-4c1c-a2fd-9e24632afbd8) I would like to put some error handling just incase things go wrong. Can anybody give me some tips on where to place error handling?Mr Shaw

SQLVDI error in eventlogs, caused by ntbackup

I wanted to prevent ntbackup from locking my databases during the nightly backup,  so I excluded the ...\Data folder from the backup set.  However, I think that ntbackup is backing up the databases during the volume shadow copy phase of the backup, even though their folder was excluded from the backup set (I verified this setting in the .bks file).  Although the lock only lasts a few seconds, the error message is worrisome and I would prefer to skip the databases completely.  How can I stop the volume shadow copy from doing this? Below is the the sequence of events leading up to the error, most recent first: Event Type: ErrorEvent Source: SQLVDIEvent Category: NoneEvent ID: 1Date:  3/23/2007Time:  3:01:49 AMDescription:SQLVDI: Loc=CVDS::Cleanup. Desc=Release(ClientAliveMutex). ErrorCode=(288)Attempt to release mutex not owned by caller.. Process=8684. Thread=7556. Client. Instance=. VD=. Event Type: InformationEvent Source: MSSQLSERVEREvent Category: (6)Event ID: 18264Date:  3/23/2007Time:  3:01:48 AMDescription:Database backed up. Database: master, creation date(time): 2007/03/12(15:08:23), pages dumped: 1, first LSN: 268:352:37, last LSN: 269:24:1, number of dump devices: 1, device information: (FILE=1, TYPE=VIRTUAL_DEVICE: {'{66DC3082-FB76-4312-AD74-4BDAD9FC7209}1'}). This is an informational message only. No user action is required. Event Type: InformationEvent Source: 

Help needed on XPath Error: System.Xml.XPath.XPathException: Expression must evaluate to a node-set.

Im trying to determine if a value already exists in an XML file. In this case I want to know if there's a node "id" with value 3. But I cant figure out how...XML:<root><data><compare><locations><id>3</id><id>5</id></locations></compare></data></root>XSL:xmldoc.SelectSingleNode("//root/data/compare/locations/id=""3""")Error:XPath Error: System.Xml.XPath.XPathException: Expression must evaluate to a node-set.

Exception caused by DataPager.SetPageProperties() on ListView (postback error)

 Hi, I have a issue with drives me crazy! I'm using the DataPager method SetPageProperties() to restore the current page in my listview after I navigated into a page related to a listview item. (I persist the current page in the session state) I display 10 items at a time, and there are 10 pages. Everything works perfectly for the first 100 items, .... but after I go beyond (to display pages 11 to 20), if I call SetPageProperties() to restore the proper "current" page, I cannot submit anymore anything without getting the following exception: An error has occurred because a control with id 'ctl00$ctl00$ContentPlaceHolder$ContentPlaceHolder1$m_ListViewSearchItems$lvProductsPager$ctl00$ctl10' could not be located or a different control is assigned to the same ID after postback. If the ID is not assigned, explicitly set the ID property of controls that raise postback events to avoid this error. The exception refers to the DataPager sub-controls which are not rendered the same way for first pages (1 - 10) than (11 - 21); Is that because it expect then a "previous page" button? I don't quite know what to think about it. Does anyone have a clue?

Error - The evaluation period for this version of SharePoint Portal Server has Expired

I am using SharePoint Portal Server 2003 and in the app log I'm seeing this error "The evaluation period for this version of SharePoint Portal Server has Expired" which I believe is causing the search service to not work and I can no longer sign in to the SP central admin console. While I did not perform the install myself it has been running for over a year and according to MS the SP PS 2003 eval was only 120 days so I assume the full version was installed.  Any idea's? There are a couple more errors in the event log but I assume they are symptoms and not causes. Event Type:    Error Event Source:    SharePoint Portal Administration Service Event Category:    None Event ID:    502 Date:        9/13/2010 Time:        9:05:03 AM User:        N/A Computer:    SP1 Description: An exception occurred in the search synchronizer. Event Type:    Error Event Source:    Service Control Manager Event Category:    None Event ID:    7023 Date:        9/13/2010 Time:        9:11:34 AM User:        N/A Computer:    SP1 Description: The Microsoft Shar

Why do I get a 401 error when calling a WCF service from a web part?

I have a SharePoint 2010 web part and WCF service deployed to a web application using Kerberos authentication. The service was developed based on the walkthrough from MSDN with the only difference that ClientCredentialType = HttpClientCredentialType.Windows so that Kerberos is used. The web application is being reverse-published through ISA. However we've never had an issue with this before. We've also disabled the loopback check on the server. When the web part calls the service, a 401 error occurs with the following exception message: The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'NTLM'. I configured Fiddler on the web application running the web part and found that both Kerberos and NTLM authentication headers are being returned: HTTP/1.1 401 Unauthorized Server: Microsoft-IIS/7.5 SPRequestGuid: 541e724c-85a7-47a0-b045-827e1c50793c WWW-Authenticate: Negotiate oXsweaADCgEBoQsGCSqGSIL3EgECAqJlBGNgYQYJKoZIhvcSAQICAwB+UjBQoAMCAQWhAwIBHqQRGA8yMDEwMDkxNDA1MjY1NlqlBQIDDgespgMCASmpDBsKREVDUy5MT0NBTKoXMBWgAwIBAaEOMAwbCnNwX3dlYmFwcDE= WWW-Authenticate: NTLM X-Powered-By: ASP.NET MicrosoftSharePointTeamServices: Date: Tue, 14 Sep 2010 05:26:56 GMT Content-Length: 0 Proxy-Support: Session-Based-Authentication Why then is the Kerberos authentication not a

Error: Expression does not produce a value.

Hello all, I need your help. I have a problem of writing the code on if statement. I am trying to read the strings for the textbox from the classlibrary. What I am doing that when I input the strings in the textbox on the form, I want to check in the classlibrary whether if the strings is matched or not.   Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click Dim c As New TestString.Strings If c.TestString(Textbox1) Then '....write the code here End If   There is an error that are jumping on If c.TestString(Textbox1) Then statement. It suggests that I need to included the value which I doesn't want to write in the long code.   Does anyone know a solve for this?

The expression contains undefined function call MyUserFunction() error :Telerik Reports

  Hello All, I am getting the error."An error has occured while processing textbox:The expression contains undefined function call FormType()". I have a report..where in i used a user function called "FormType". My datasource  for teh report is sharepoint list. I am passing a parameter to the user function in the code.My user functions retrieves three values(one each time based on the conditions)But when i select the user function..in the edit expression dialog box.. i am not writing any parameter inside the user function as i am not sure what to write there. I have gone through http://www.telerik.com/support/kb/reporting/designing-reports/the-expression-contains-undefined-function-call-myuserfunction-error.aspx and thought i might fall in 2nd cateogry..but unable to find a solution for that Please help me. Here is the code. InitializeComponent();             string strType;             SPSite oSite = new SPSite("spsiteurl");             SPWeb oWeb = oSite.OpenWeb();             string[] parameters = { "10", "100", "1000" };             T

OPENQUERY Error when calling usp - object has no columns or the current user does not have permissio

Hi Guys, I need to get data using a usp, but getting error: Cannot process the object "EXEC BKS..uspPayments @paymentTypeCode1 = '1', @paymentTypeCode2 = '2', @paymentTypeCode3 = '3';". The OLE DB provider "SQLNCLI" for linked server "SERVER" indicates that either the object has no columns or the current user does not have permissions on that object. I am trying the script below: use myDB; select * from OPENQUERY([SERVER], 'EXEC myDB..uspPayments @paymentTypeCode1 = ''1'', @paymentTypeCode2 = ''2'', @paymentTypeCode3 = ''3''; ') Thanks in advance for any help. Everything is possible, impossible just takes longer
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