Home » SQL Server

Code: 0xC002F210

Hi All,

Error: 2011-01-25 07:00:58.03
   Code: 0xC002F210
   Source: Update Statistics Task Execute SQL Task
   Description: Executing the query "UPDATE STATISTICS [dbo].[INVESTMENT_TRANSACTION_AL..." failed with the following error: "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.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

from the above error message, please explain the following:

1) Code: 0xC002F210
2) A severe error occurred on the current command.  The results, if any, should be discarded. A severe error occurred on the current command

Satish Kumar.

3 Answers Found


Answer 1

Hi Satish,

To answer your questions:

1. 0xC002F210 is DTS_E_SQLTASK_ERROREXECUTINGTHEQUERY (self-explanatory).: http://msdn.microsoft.com/en-us/library/ms345164.aspx

2. Basically, it says to disregard any results or revert changes if any happened because of the error executing query.

You should probably start from posting a query you are trying to execute and options that you have set for your Execute SQL SSIS Task. And, most likely, SQL Server Integration Services forum is a better place to post this (you don't have to post it there again though).





Answer 2

Hi Akim,


This occurs during the update stats...



Satish Kumar.


Answer 3

Hi Satish,

Can you run the same query in MAnagement Studio?

With all the details provided, here is my best guess:

"Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly."

You will find something wrong if you check all mentioned above points of failures.



Search for  Code: 0xC002F210



In coded UI test- when do we use hand coding? In most of the blogs and training materials it talks about recording is very good option, but I need to understand what make hand coding attractive and when should I use this feature?







Below mentioned line is one of the coding standard rule. Can you please explain me about this rule. What is the advantage of this Fxcop (Coding standards) rule?

Should not used Hexadecimal color values. Should used the color fro  Aqua, Black, Blue, Fichsia, Gray, Green, Lime, Navy, Maroon, Olive, Purple, Red, Silver, Teal, White and Yellow.

Please help me out on the same!!!


Pon Kumar Pandian .T


DSL Tools are purposed for generating code. But what if I want to execute code? Is there some extensibility mechanism with DSL Tools to provide scripting or such?

My idea is to create VS solutions and projects based on a DSL.



Hello There,

We want to use new Entity framework 4 with Code only (Code first) feature.
We have N-tier architecture(Silverlight client, WCF ,Domain layer,DAL).I dont use T4 tool to generate POCO classes. I want to use "Code Only" feature.

In DAL using pure POCO classes i am hydrating mapped data(mapped in configuration) from respective table using Entitry framework. This Hydrated POCO object provided to silverlight client using WCF web service. Silverlight client update few rows with few field and Send back to server to save to database using EF4 in DAL.

Above is disconnected architeture, Therefor changes made by silverlight client is not aware at DAL (on server).

1. How do update/save my entity to database ?
2. How to track my changes to optimise my saving ( save only updated rows/data from poco object).





I have two table T_Mater and T_Detail with respecitive entiry Mater & Detail. The table (Entity) Mater have three column KeyA,KeyB,KeyC as unique key (Composite key). This table (entity) has relation with Detail like parent-child. Detail also have related key from Mater are KeyA,KeyB,KeyC. Thesea are virtual keys from Mater.


KeyA // from Master
KeyB // from Master
KeyC // from Master
KeyD // key

There is not FK defined at table level. How to develop Relationship using "Code Only" or "Code First" feature in Entity FrameWork 4 ?




I have created dll's for small modules in VS 2008 later I have imported them in VS 2005 & used function call from there.When I executed the application build in VS 2005 it crashed when an function call from module hit.Is this crash because of compatability issue with VS 2008 & VS 2005?




I hope is the right forum... I have just installed the VS2010 release (trial) and encounter a weird situation -

This code (from MSDN Documentation http://msdn.microsoft.com/en-us/library/0c899ak8.aspx ):




value AsDouble

value = 123







works like it should but when while in run time, I'm trying to run the following code in the Immediate Window:



I'm getting the following error:


{"Enum value was out of legal range."}

_HResult: -2146233086

_message: "Enum value was out of legal range."

ActualValue: Nothing

Data: {System.Collections.ListDictionaryInternal}

HelpLink: Nothing

HResult: -2146233086

InnerException: Nothing

IsTransient: False

Message: "Enum value was out of legal range."

ParamName: Nothing

Source: Nothing

StackTrace: Nothing

TargetSite: Nothing



Any idea what is going on?


what is exact difference in java script tag like 

<% = some code %> and 

<# some code %>

 am reinstalling a windows 2003 server and the installer will not accept the code on the box sticker  I have had others check to make sure it is typed correctly what's next is there a number I can call?

I have created a UI Coded Test and it will run fine as long as I run it from the VS2010 environment.  Once I compile it to DLL, how can I use that DLL in another application?  It's really syntax that I'm looking for here.  Also, it seems that even after I compile the UI Coded Test into a dll, and reference the dll in another project, the reference cannot be used after the first build, even though intellisense immediately gives me visibility to the namespace and the reference still shows up in my ref list.

Incidentally, Vishnu told me to post this here rather than in the other forum.



I have a running application installed on IIS. All the files in Virutal directory location are 1Kb .ASPX files. But I don't have the right aspx files and their corresponding code behind for these pages. The website folder does not have few aspx pages. I have to make enhancements to this site now. Is there any way of retrieving .ASPX and .ASPX.CS files for these files.

Please point to me to the right forum in case this forum is not the right one to discuss this.



We have a problem with the new project we have been developing. 

The new components are built using Visual Studio 2005 in the following way

Client                            standard C# managed code – has a reference to the Cadi Api Wrapper DLL

Server                           standard C# managed code – has a reference to the Api Wrapper DLL

Api Wrapper DLL           managed and unmanaged code compiled with the /clr option and uses Api Lib

Api Lib                          managed and unmanaged code compiled with the /clr option

Third Party RPC DLL      not sure how this is built - probably a Win32 project  

Note: The Api Wrapper DLL and Api Lib both make calls into Third Party RPC DLL.

We have in the past had problems within the Third Party RPC DLLand therefore decided to load the Third Party RPC DLL at runtime using LoadLibrary (rather than statically linking) and FreeLibrary, GetProcAddress, etc, this enables us to unload the Third Party DLL when we encounter a problem namely an Exception or lockup from the Third Party RPC DLL.

However when we use a release build of our code to send or receive certain messages we get crashes when we access the Third Party RPC DLL, but it all works correctly under the following configurations: 

All components built as debug All components built release, with statically linked Third Party RPC DLLAll components built release running within Visual Studio (pressing F5)

 We have performed some testing to ascertain the cause of the crashes.  We have found the following: 

If we send message X from Release version of the Server to Debug version of the Client, the server-side crashes.  We think this is happening in the Third Party RPC DLL when it is XDR encoding the message structure.If we send message X from Debug version of the Server to Release version of the Client, the client-side crashes.  We think this is happening in the RPC DLL when it is XDR decoding the message structure.If both Server and Client are Release versions the server-side crashes as in 1.If both Server and Client are Debug versions everything works as expected.When using Release version of the Server and Client, some messages are sent and received correctly.

When the crash occurs, a windows dialog pops up with the error “____.exe has encountered a problem and needs to close…..debugging with visual studio gives a buffer overrun dialog and complains there are no symbol files – so can only show disassembly. PDB's are produced for the release version of our code (i.e. not 3rd party)

Using WinDbg the error reported is an Access Violation and references the Third Party RPC DLL.

The event log says the following

Faulting application xxxxxxxxxxi.exe, version, faulting module mscorwks.dll, version 2.0.50727.3607, fault address 0x0025a6be.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

We have analysed the message structures being sent from the client to the server (and vice versa) and found the following 

A message containing a single int works okMessages containing a structure which contain only ints and shorts appears to work okMessages containing a structure with char buffers (array) appear to work okMessages containing a structure with one or more single byte chars appear to cause the crash


We suspect that problem is caused by misaligned data or is a Marshalling problem, but if so don’t understand why a Release build using a statically linked Third Party RPC DLL works fine, while dynamically loading the DLL at runtime crashes.

We have tried updating the packing /ZP (structure member alignment) and #pragma pack. 

RPC  -  Remote Procedure Call (this is Sun ONC RPC)

XDR  -  eXternal Data Representation

If anyone has any idea what this problem maybe OR how to debug this problem please help.



I know how to create multiple UI maps when recording steps on VS2010 using coded UI recorder.

is it possible to do the same thing when using MTM pre-recorded code ?

for example : different UI map for each added test

thanks, Ayelet

When i try to create a custom field table in EPM 2010, I get the following error in PWA:

The lookup table could not be saved due to the following reason(s):

One or more code values in the lookup table contain a code mask separator

I have a lot of information edited in this lookup table and I need to save this.

Any idea? I've done a lot of this type of lookup tables in 2007 version.

I have looked through the forums and cannot find anything related to this question.  Is there a way to know what all of the possible data elements and associated identifying code that are in the immunization field or any field for that matter?
I am getting the following error "An item with the same key has already been added." when I try to generate code for the Coded UI recording.  The situation is that I created a new test project.  I then make a recording and generate the code.  I then create a new test and record the actions.  When I click the generate code button I get the error.  Both test are very similar in the steps that are being performed.  I start the application. Select a menu option. Open a file and process the file.  Then close the application.  The menu options that are selected are different.  The files that are selected are in different directories and the the files themselves are different.  The processing is different as well.  However the application uses a generic processing form which is what gets opened when the menu options are selected.
can I do in MDS?  When viewing a hierarchy, I want to show the name, not the code, of the consolidated members.  The leaf members, I would still like to see the name and code.


I've made the following simple example of a program for which I get an error when attempting to compile as "C code" but not when attempting to compile as "C++ code":

#include <stdio.h>

int main(void) {
  char filename[256];
  printf("Enter file name: ");
  fgets(filename, 256, stdin);
  FILE * file;
  file = fopen(filename, "r");
<span style="font-family:Consolas; font-size:x-small"><span style="font-family:Consolas; font-size:x-small"><p>Further, I can further refine this to get what I perceive as the "bare minimum" necessary to generate the error:</p><pre lang="x-cpp">#include <stdio.h>

int main(void) {
  FILE * file;

However, if I make the simple change of removing printf, and thereby obtain the following code:

#include <stdio.h>

int main(void) {
  FILE * file;

then this compiles without any problem (except a warning, of course).


To summarize and to be perfectly clear, when set to "compile as C code", the first and second examples result in "error C2275: 'FILE' : illegal use of this type as an expression", while the third example compiles just fine. However, when set to "compile as C++ code", all of the examples compile without anything more serious than a warning.

My question is: why? I can't seem to find an answer anywhere. As I'm a beginner, I'm assuming that this isn't the result of a "bug", and that, in fact, I'm somehow doing something wrong. Any insight would be greatly appreciated. Thanks.

My company distributes utilites as compiled native DLLs.  These utilites are called either from native code (VB6) or managed VB.NET code (VB 2008).  I want the operating system to automatically save a user-mode dump (as described in http://msdn.microsoft.com/en-us/library/bb787181(VS.85).aspx) whenever the native code in the DLLs throws an unhandled exception.  

When running under Vista SP1, when the utilities are called from native code (VB6) and the DLL throws an exception, I get a dialog box saying "'Application' has stopped working.  Windows can check online for a solution to the problem."  There are three buttons: "Check online for a solution and close the program", "Close the program" or "Debug the program".  When I press "Close the program" there is a pause and the dump file is saved.

However this does not work when the utilities are called from managed code.  I have tried calling
  Application.SetUnhandledExceptionMode (UnhandledExceptionMode.ThrowException, False)
before Application.Run in my main.vb file.  When an exception occurs, I get the same dialog box as before, but a dump file is not saved.

I get similar results when running under Windows XP and using Dr. Watson.  That is, a dump file is saved when the utilities are called from native code, but not from managed code.

Thanks, any help would be appreciated.


Is there anyway to have code analysis run against just the code being changed/checked-in by a certain date/version?

We are getting 5000+ warnings and much of our code is legacy code we can't change. We'd like to just run code analysis against all new code.

Is this possible?


<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure