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


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

An error occurred while executing the command definition. See the inner exception for details.

Posted By:      Posted Date: October 21, 2010    Points: 0   Category :ASP.Net
 

Hello,

In my mvc asp.net application, I am getting error in edit function : in given code

public ActionResult Edit(int id)
{

     
var res = (from r in objeEntities.DocumentationsSet.Include("DocStatus")
               
where r.textid == id select r)
               
.First();
}

I am getting this exception:

  • Source : System.Data.Entity

    Stack Trace : at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) at System.Data.Objects.Internal.ObjectQueryExecutionPlan.Ex


    View Complete Post


More Related Resource Links

Error: A native exception has occurred in my_file.exe

  
Hello everyone,   This error is occurring with me when I am working with SSCE in my pocket PC. Can anyone tell me why?   Thanks!

Pass exception details to custom error page.

  
Hi All, I created a custom error page and update using webApp.UpdateMappedPage(SPWebApplication.SPCustomPage.Error, CustomErrorPage). Its working fine and my custom error page is show if error is occurred. OR We redirect using SPUtility.RedirectToErrorPage("my message"); But I am not able to find my exception details at my custom error page. Is there any way to pass the exception details and other custom information to custom error page?  

Getting Error " Error occurred in deployment step 'Add Solution': Exception from HRESULT: 0x810702

  
i'm getting the following error when deploying my sharepoint project i've created 3 site templates by adding according to this article http://www.sharepointbits.com/blog/sharepoint-2010-custom-site-templates.html but when i deployed my project i got the following Error occurred in deployment step 'Add Solution': Exception from HRESULT: 0x8107026E

A severe error occurred on the current command. The results, if any, should be discarded

  
I m using MOSS 2007 and sql server 2008n. when i expand the database from 100 GB to 500 GB, i get the following error message:- A severe error occurred on the current command.  The results, if any, should be discarded. Any idea about this error in sharepoint. I have found many articles but all are related to sql server only. There are some hot fixes available for same problem but don't know, which one is right for this problem. Any help would be appreciated. Cheers, Hemendra-MCTS "Yesterday is just a memory,Tomorrow we may never see"

A severe error occurred on the current command. The results, if any, should be discarded.

  
I am running this basic query on my database, this table has ~ 130k rows with around 10 columns.  I am running it in my management studio.  I restart my MSSQLSERVER and it worked again but I am afraid it will come back up, how can I debug this issue? SELECT * FROM Table1 Msg 0, Level 11, State 0, Line 0 A severe error occurred on the current command. The results, if any, should be discarded.  

A severe error occurred on the current command. The results, if any, should be discarded

  

Hi ppl,

I m using MOSS 2007 and sql server 2008 SP2. I increased  the database from 100 GB to 500 GB, after increased teh database size, i am getting following error message:-
A severe error occurred on the current command.  The results, if any, should be discarded.

I am having this issue with only with particular content database. I have checked some stored procedure and tables and i have found this error with 

"SP_GetCurrent" stored procedure and "dbo.EventCache" table.

Any idea about this error. There are some hot fixes available for same problem but when i am trying to install below hotfix on database server it is saying..

http://support.microsoft.com/kb/971490/en-us

"You have already install updated version". but i have not install any hotfix on server

Any idea about this error.


Cheers, Hemendra-MCTS "Yesterday is just a memory,Tomorrow we may never see"

ORDER BY clause causes 'A severe error occurred on the current command. The results, if any, shoul

  

Hello,

I'm trying to execute the following:

SELECT STATE_CODE5
  FROM qaeda.R727702b.NF29005
  WHERE STATE_CODE5 IN ('IL','NV','VA','NH','HI')
  InTERSECT
  SELECT STATE_CODE8
  FROM qaeda.r727702b.NF29008
  WHERE STATE_NAME8 = 'HAWAII'
 ORDER BY STATE_CODE5;

In both 2005 and 2008 versions of the SQL Server the query parses ok, but on execute I get the following error:

Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command.  The results, if any, should be discarded.

If I remove the the 'ORDER BY' clause, I am able to execute the query with no problem. 

I've searched the forum and I know this error comes up often in various circumstances, however I didn't see anything similar to this.  Please advise, maybe I'm writing the query incorrectly?  Thanks

 

 


Error trying to upload word .doc document to Sharepoint 3.0 Exception occurred. (Exception from HRES

  
We have recently moved our shrepoint WSS 3.0 site to a new server running WSS3.0 on Server 2008 R2. Since the migration everything is as it was and working ok execpt we are now unable to upload word .doc files to the site. When we try to attach a .doc file we get :

Error - Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))

Other file types ie .pdf .ptxt etc can be uploaded ok but .doc fails. I have checked blocked file types in Central administration but .doc isn't listed.

Any ideas.

Thanks in advance
James

Error: "An exception occurred communicating with the Operations Manager RMS" when attempting to refr

  

I am trying to publish a vdw drawing that is connected to SCOM data to my SharePoint 2010 environment. I am able to successfully publish the file, but any refreshes result in this error:

"An exception occurred communicating with the Operations Manager RMS.  Please contact the administrator."

According to an article I read, there is the ability to enable trace logging for the data provider. I have attempted to enable logging by creating the file C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Visio.Server.OperationsManager\1.0.0.1122__\Microsoft.Office.Visio.Server.OperationsManager.dll.config, however, nothing is logged to the location specified when I perform refreshes (this config file was installed on all WFE's).

Here's the output of the SharePoint trace log:

11/03/2010 07:06:00.09 	w3wp.exe (0x1770)            	0x0F68	Visio Graphics Service    	Web Access          	9lob	Verbose 	Retrieving source data using addons	6742d572-403f-45a6-aa50-b60503711c73
11/03/2010 07:06:00.09 	w3wp.exe (0x1770)            	0x0F68	Visio Graphics Service    	Web Access          	9ln9	Verbose 	Registering addon data sources	6742d572-403f-45a6-aa50-b60503711c73
11/03/2010 07:06:00.09 	w3wp.exe (0x1770)            	0x0F68	Visio Graphics Service    	Web Access          	9lnn	Verbose 	Parsing data module connection string...	6742d572-403f-45a6-aa50-b60

A severe error occurred on the current command. during data save

  

I am using Sql Server 2005.

When I save data, I get an error message

 

A severe error occurred on the current command.  The results, if any, should be discarded.

what is the problem ? how to resolve this problem ?


A severe error occurred on the current command

  

As per the below link, it is clear that it is a bug in SQL 2005.

http://support.microsoft.com/kb/928372

But I faced the same issue in SQL 2008 SP1 CU7, while creating index on a very large table.

can anyone please confirm or point me to any KB article, where it says it is a bug in SQL 2008 as well?

Thanks

PD


command object error

  

Could someone please tell me what is wrong with my syntax here?  I'd be much appreciative.

 

objCmd = New SQLCommand("SELECT CASE WHEN objDR('Item') = 'Enter Bill of Lading' then enterbol " _  

& "WHEN objDR('Item') = 'Bill of Lading History' THEN bolhistory " _  

& "WHEN objDR('Item') = 'Request Transfer' or objDR('Item') = 'View Transfer in Progress' THEN transfers " _  

& "END  from plantGroups where plantgroupid=@plantgroupid", objConn)


Error while using exception handling block el 4.1

  

Hi Folks,

 

i am trying to use tyhe exception handling block of Enterprise library 4.1.

 

I just createda polisy and used IndexOutOfRangeException and added a replace handler and a logging handler to it.

I am using the NotifyRethrow PostHandlingAction to the exception.

 

During runtime I am getting an exception on the HandleException event, The exception is added below:

 

 

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:

Line 42:             catch (Exception ex)
Line 43:             {
Line 44:                 bool reThrow = ExceptionPolicy.HandleException(ex, "ReplacePolicy");
Line 45:         

A generic error occurred in GDI+.

  

Hi,

I'm getting this error on the yellow screen and I have no idea what to do with it, or where to start:


[ExternalException (0x80004005): A generic error occurred in GDI+.]
System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams) +377630
NopSolutions.NopCommerce.BusinessLogic.Media.PictureManager.GetPictureUrl(Picture picture, Int32 targetSize, Boolean showDefaultPicture) in F:\Temp\Test\nopCommerce 1.60\Libraries\Nop.BusinessLogic\Media\PictureManager.cs:396
NopSolutions.NopCommerce.BusinessLogic.Media.PictureManager.GetPictureUrl(Picture picture, Int32 targetSize) in F:\Temp\Test\nopCommerce 1.60\Libraries\Nop.BusinessLogic\Media\PictureManager.cs:180
NopSolutions.NopCommerce.Web.Administration.Modules.CategoryInfoControl.BindData() in F:\Temp\Test\nopCommerce 1.60\NopCommerceStore\Administration\Modules\CategoryInfo.ascx.cs:63
NopSolutions.NopCommerce.Web.Administration.Modules.CategoryInfoControl.Page_Load(Object sender, EventArgs e) in F:\Temp\Test\nopCommerce 1.60\NopCommerceStore\Administration\Modules\CategoryInfo.ascx.cs:99
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy

A generic error occurred in GDI+

  

I am getting this error at this line in my code: ImgThnail.Save(ThumbnailPath, Img.RawFormat);

Here is the entire code :

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Drawing;


    public static class Thumb2
    {
        public static string createThumb(this HttpServerUtility srv, string endPath, string tempPath, int relSize)
        {

            string ThumbnailPath = srv.MapPath("~\\Thumb\\" + endPath);
            string dimensions;
            using (System.Drawing.Image Img = System.Drawing.Image.FromFile(srv.MapPath("~\\" + tempPath))) 
            {
                Size ThumbNailSize = NewImageSize(Img.Height, Img.Width, relSize);
                dimensions = Img.Width.ToString() + " x " + Img.Height.ToString();
                using (System.Drawing.Image ImgThnail = new Bitmap(Img, ThumbNailSize.Width, ThumbNailSize.Height))
                {
                    ImgThnail.Save(ThumbnailPath, Img.RawFormat);
                    ImgThnail.Dispose();
                }
                Img.Dispose();
            }
            return dimensions;
        }
        private static Size NewImageSize(int OriginalHeight, int OriginalWidth, double FormatSize)
        {
            Size NewSize;
            double tempval;
            bool landscape;
   

Error Handling: Throwing Custom Exception Types from a Managed COM+ Server Application

  

Exception handling semantics in .NET are based on type, so you can create custom exceptions that have their own properties and methods. In .NET, exceptions are first-class citizens, and since they're the built-in error handling mechanism, all .NET-compliant languages must support exceptions. In addition, COM+ services are available to .NET code as Enterprise Services, so you can leverage exceptions in your Enterprise Services design.In this article the author describes custom exceptions, throwing exceptions across COM interop boundaries, and working with Enterprise Services.

Bob DeRemer

MSDN Magazine March 2004


An operations error occurred in ActiveDirectoryMembershipProvider

  

Hi guys, i have an application that uses Active Directory Authentication and deployed the application several days ago without any error. Today, I got this error.please refer to the image. I find it  weird because I didn't change any code to my webconfig file since i deployed the application to the server. I've notice that it's working if it's http://localhost:50618/website/login.aspx (by opening the source file in server and debug it) however when i try to access the application through http://10.3.11.75/ReCAPS/login.aspx. I'm getting this error. I'm using 2.0 framework

And here's my web.config

 <connectionStrings>
        <add name="ADConnectionString" connectionString="LDAP://10.3.11.3/DC=test-asia,DC=com"/>
    </connectionStrings>

 <identity impersonate="true"/>
        <membership defaultProvider="MyADMembershipProvider">
            <providers>
                <add name="MyADMembershipProvider" 
                type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0,               Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 
                conn
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