.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

error while executing SP more than one time

Posted By:      Posted Date: September 05, 2010    Points: 0   Category :Sql Server
below the sample table and SP, CREATE TABLE A (ID INT IDENTITY(1,1), SOURCE VARCHAR(5)) ALTER PROCEDURE TEST2 (@PASSEDXML XML) AS BEGIN BEGIN TRY DECLARE @TESTXML XML(test) SET @TESTXML = @PASSEDXML PRINT 'A' END TRY BEGIN CATCH INSERT INTO A (SOURCE) VALUES ('A') END CATCH END GO and the XML schema "test" is below, CREATE XML SCHEMA COLLECTION [dbo].[test] AS N' <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:simpleType name="GroupOrder"> <xs:restriction base="xs:string"> <xs:pattern value="[1-9]"/> </xs:restriction> </xs:simpleType> <xs:element name="PDI_Approval_MetaData"> <xs:complexType> <xs:sequence> <xs:element name="TranDetails"> <xs:complexType> <xs:sequence> <xs:element name="GroupOrder"> <xs:complexType> <xs:attribute name="Value" type="GroupOrder" use="optional" /> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>' Now, while I executing below SP (that goes to catch

View Complete Post

More Related Resource Links

Custom Control Design-Time SiteMap Provider Error


Greetings - I was referred here by MSDN forums hope this is the right place -  

I have a custom control (:WebControl) that renders web.sitemap in a specific way. While it runs error free and produces the expected result, at Design-Time it complains

Error Creating Control - MyControl  The provider 'AspNetXmlSiteMapProvider' specified for the defaultProvider does not exist in the providers collection.

I have discovered that the error is cause by this line of code:

string div = string.Format("<div class='{0}' id='{1}'>{2}</div>", this.CssClass, this.ID.ToString(), EnumerateNodesRecursive(SiteMap.RootNode, level));

or more specifically, by the reference to SiteMap.RootNode - I am not clear what is missing thoough because I have configured the SiteMapProvider in web.config as this:

        <add name="AspNetXmlSiteMapProvider" 
             type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 

Trying to set Calendar Time Interval Using Calculated Column, but getting Error



So i was trying to use a calculated column that added 7 days to the start date of a calendar item. The calculated column worked fine because i checked with several tests. Then i tried using the Column as the End Time in the Time Interval Setting in the Calendar View. This broke Sharepoint. Not the normal graceful error im using to seeing from Sharepoint but the Server Error Page when a dump happens in a ASP page. I havent enabled the full error page because i assume its not like i can fix it, i dont have the source code.


Does anyone else experience this? If so is it a known problem and being worked on?




Error Executing CLR Stored Procedure "Item has already been added. Key in dictionary"

Hello, I'm consuming a web service through assemblies in a Sql Server 2005 database. The client was made with VB.net 2005. Everything was fine in the deploy phase but once I compile the assembly generated in my sql server database and try to execute the CLR stored procedure defined in the assembly it crashes throwing the following error: Error: There was an error generating the XML document. Inner Exception: Item has already been added. Key in dictionary: 'SqlCifin.InfoComercial.ParametrosConsultaDTO' Key being added: 'SqlCifin.InfoComercial.ParametrosConsultaDTO' Where SqlCifin is the name of the assembly, InfoComercial is the web reference namespace and ParametrosConsultaDTO is a complex type defined in the WSDL to encapsulate the request parameters. I tried almost everything but nothing seems to work: Already checked the enviroment variables and . I would appreciate any help you can provide me.  PD: I'm using WSE 3.0. Thanks, Andres Diab.

Error on executing VB file : The assembly does not allow partially trusted callers

Dear All ! Though there are many posts stated with solutions, im still facing the error in my application. I have created a VB Class Library project in VS 2008 which on execution in another application (ERP) will open a VB form holding a report. Its working fine in Server machine. The report is drawn from a DB placed on another server. Everything works fine in Server. But in another machine its not.  I did opened the project from the local machine, Build it so tht the dll be caught in the ERP application and so it did, iam able to see the dll within the application. but on execution its throwing the error 'The Call to member failed. The assembly does not allow partially trusted callers ' What should i do in order to execute the project in all local machines application ??   Thanks in Advance... waiting for a solution.. Radhai.  

Error while executing a package through SQL Server Agent

Hi All,   I have a ssis package. It has 3 tasks, first task updates a record in Oracle database to set an Indicator to “Y”, second task process SSAS Cube and the third again updates the same record and sets the indicator to “N”. This package has 2 data sources, one is Oracle and the other is Analysis Services. I gave the credentials for the Oracle and use NT Authority for Analysis services.   When I am executing from BIDS package is executing successfully. But when I am calling the job to execute this package its throwing me the error. Below is the error.     Message Executed as user: User\Username. ...ion 9.00.4035.00 for 64-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Started:  10:57:46 AM  Error: 2010-08-27 10:57:46.79     Code: 0xC0016016     Source:       Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.  End Error  Error: 2010-08-27 10:57:47.16     Code: 0xC0202009     Source: Ord_test Connection manager &q

Just-In-Time Debugger error when opening SQL Server studio express

Hi,   I am new to these forums; hope I am posing in the correct forum   I have problem opening the SQL Server 2005 Management Studio Express. Getting the error below   'An unhandled win32 exception occurred in ssmsee.exe [5336]'   Searched in many forums but none of the suggestions resolved my issue..   I have re-installed .net 2.0, upgraded to 3.5 but still no luck either   Have re-installed SQL server management studio express again no luck   Deleted the shell folder from both documents and settings and in registry still have the same problem   Appreciated your suggestions to resolve this issue   Many thanks

Query Time out error?

Iam getting the querey time out error, when processing dimension in SSAS? The error Details is: OLE DB or ODBC error: Query timeout expired; HYT00; Unknown token received from SQL Server; HY000.\ can any one help me on this....how to resolve this?

SQLDataAdapter/SQLDataReader takes lot of time for executing a query

All, I have a webpage with 6 drop down lists. User can start with selecting any drop down list first, and then proceed in any order.  1. Assume when the 1st dropdown is selected first, rest 5 drop downs (except 1st) are filtered/updated based on the selected value in the 1st dropdown. 2. Assume user selects the 4th dropdown second, rest 5 drop downs (except 4th) will be filtered/updated but the condition would be based on both 1st drop down and 4th drop down. But while filtering the first drop down, only the 4th drop down is used as filter (self-filter will be ignored). The code works fine but I see a very bad performance hit in time when the user selects the fourth dropdown after selecting three drop downs. I tried using both SQLDataAdapter and SQLDataReader but neither used to solve the issue. The code takes a lot of time on one line in either of the code (which is highlighted below). When I run the query in SQLServer Mgmt Studio, the query completes in a few seconds.Using SQLDataReader: SqlConnection conn = new SqlConnection(CONNECTION); SqlCommand ObjCmd = new SqlCommand(query, conn); ObjCmd.CommandTimeout = 600; conn.Open(); SqlDataReader daSelTools = ObjCmd.ExecuteReader(); //This line takes a lot of time ddl.Items.Clear(); // Call Read before accessing data. while (daSelTools.Read()) { ddl.Items.Add(new ListItem(String.Format("{0}",daSelTools[0])));

run-time error's do not jump to problem line but to assembly with some xml error.

  Used too, when there was a runtime error the ide would break at the line that caused the problem. Now I'm thrown into some assembly code with the error System.Windows.Markup.XamlParseException was unhandled   Message='The invocation of the constructor on type 'Main.MainWindow' that matches the specified binding constraints threw an exception.' Line number '4' and line   Which is extremely uninformative and inefficient. I can look down the chain to find the error thrown but this still is not very informative. How the heck can I get it back to the way it used to be? This has something to do with wpf and the assembly code has System.Windows.Markup.XamlReader.RewrapException as the address. I spend anywhere from 10x to 10000x as long because of this. If the code is simple then I still have to read the error code and click a button which takes time.   Also, I'd rather it break on the line and quit the process as it used to do. I don't need JIT debugging.  

PresentationHost.exe throw error: C Run-Time Error R6034

Hello, we are hosting one of our WPF (.NET 3.5 SP1) components within XBAP and thus it delivered through browser (explorer 8.0) to client. Some time clients (running explorer) receive error and this error thrown by presentetionhost.exe. The error is: C Run-Time Error R6034. We looked the error in forums and it appears related to manifest. But manifest exists for that WPF/XBAP application. Furthermore, the error does not occurs always only sometime and it not consistent it cannot be recreated on same machine for same scenario. Cleaning online app cache with mage.exe -cc does not resolve issue it continue to appear occasionally. Some comment: 1. it seems only appear at client machines, no evidence it appeared at developers machines. 2. Sometime application continues working after error box closed, but sometime it crushes. 3. May be it is not relevant but, the application accessing server side with WCF, but no error in this area. Does someone have ideas how to get rid of the error? Thanks, Pavel

Error in executing a stored proc

Hi Team, I have problem in executing a stroed proc SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO --exec PBT_Broker_Report 'PBTBFDAGT ' Alter PROCEDURE PBT_Broker_Report  -- Add the parameters for the stored procedure here @BrokerID nchar(10)  AS BEGIN SET NOCOUNT ON; declare @sql nvarchar(3000) ;   IF EXISTS (    SELECT *    FROM information_schema.tables    WHERE Table_Name='Test_Broker'    )    BEGIN    DROP TABLE Test_Broker    END     set @sql = (case @BrokerID     when 'All' then    N'    SELECT PO.COMPANY_CODE,PO.POLICY_NUMBER, PO.primary_insured    INTO Test_Broker   from dbo.POLICY po   where PO.AG_AGENT_NUMBER <> ''PBT001''   '     else        N'   SELECT PO.COMPANY_CODE,PO.POLICY_NUMBER, PO.primary_insured,   INTO Test_Broker   from dbo.POLICY po   where    PO.AG_AGENT_NUMBER = @BrokerID   AND AG_AGENT_NUMBER <> ''PBT001''  '   end ) --print @sql execute sp_executesql @sql     Error: Must declare the variable '@BrokerID' Please suggest me some solution

error: << unexpected at this time

hi Am trying to install temporary service certificate on my pc. the client and the server are on the same machine http://msdn.microsoft.com/en-us/library/cc949067.aspx  I have followed the steps.. and am good till second step.. but in step : 3  after the  makecert -sk <<UniqueKeyName>> -iv RootCATest.pvk -n "CN=<<MachineName>>" -ic RootCATest.cer -sr localmachine -ss my -sky exchange -pe i am getting the error saying "<< was unexpected at this time" , and could not proceed furthur.   Please let me know   thanks

Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil' in asp.net mvc

I am getting following error in production but the same is not a repro in in local.> Error executing child request for> handler> 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerWrapper'.> Inner Exception: Exception of type> 'System.Web.HttpUnhandledException'> was thrown.Stack Trace:    at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)    at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage)     at System.Web.HttpServerUtilityWrapper.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm)    at System.Web.Mvc.ViewPage.RenderView(ViewContext viewContext)         at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)         at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass14.<InvokeActionResultWithFilters>b__11()    at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)     &

Service is executing code after time out.

Hi All,  I am using IsOne way and nettcp binding in mu WCF. [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single,ConcurrencyMode=ConcurrencyMode.Multiple)]   public class FlexiAsyncServer : IAsyncInterface   {       public void OneWayRequest()         {              for (int i = 0; i <= 5000; i++)                 {                     DbCommand cmd = dbAsync.GetSqlStringCommand("insert into  JOB_DEFNN (JOB_NM,JOB_STAT_CATG_ID,JOB_GRP_ID) values('"+i.ToString()+"',1,101)");                     dbAsync.ExecuteNonQuery(cmd);                 }           } } In Service side before inserting this 5000 records into database i am getting time out error in client side. But though i got error the records are being inserted until it complets 5000. My question is why the service side execution is not stopping a

Executing PowerShell script for the first time


I am very new to Powershell scripting. I wanted this type of script to be executed for a requirement. Hence I downloaded WindowsServer2003-KB926139-v2-x86-ENU.exe version 1.0 and I referred "Activating features in bulk on the MySite with PowerShell" topic from http://vallery.net/category/sharepoint-2007/

I just copied the script in a notepad, modified the feature ids as per my requirement and saved the file as activate.ps1. Next i opened powershell command prompt and tried to execute the script by typing c:\activate.ps1. But this ended up with following error "The term 'activate.ps1' is not recognized as a cmdlet, function, operable program, or script file". Verify the term and try again.

Can any one help me to run the script. Are there any steps to be performed after installing powershell? I just want the script in the above URL to be executed. Its very urgent.

Thanks in advance,
Ranjana Hegde

Job getting failed because of time-out error.


Hello Everybody,

                         I am having an automatic job which will run for every 30 mins. Sometimes, the dataload is getting failed because of time-out error. Please find the error details below.

Source: Process IMPT DWH Dimensions Analysis Services Execute DDL Task 
   Description: OLE DB error: OLE DB or ODBC error:
Time-out occurred while waiting for buffer latch type 4 for page (3:346697), database ID 2.; 42000.  End Error  Error: 2010-09-21 10:48:15.86     Code:

0xC11F000C     Source: Process IMPT DWH Dimensions Analysis Services Execute DDL Task     Description: Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'IPMT User Dimension', Name of 'IPMT User Dimension' was being processed.  End Error  E.  The step failed.

Please help me on this.

Thank you!!



Error while executing SSIS package from a Stored Procedure


I am getting an error while executing a SSIS Package from SQL Server Stored Procedure.  But when I run it in BIDS, it executes successfully. Any help on this ???

SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occured.  Error Code: 0x80040ED. An OLE DB record is available. Source "Microsoft OLE DB Provider for Oracle" Hresult 0x80040eD Description: "ORA-01017: invalid username/password; logon denied"

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