BloggingAbout.NET
Thoughts of developers
SQL Adapter Wizard Query twice
Robert Rijsdijk's Weblogs

Syndication

When u want to receive XML data from your stored procedure which containts a SELECT and UPDATE (processed records) statement, you can have some problems to Generate the SQL Adapter XSD.

When u press the last Window in the Wizard you could get an error message Failed to execute queury.

What we saw in the SQL Profiler is that the Generate SQL Adapter Wizard Executes twice the stored procedure Oops. The first one from Application name SQLClient provider and the second one from Visual Studio .NET 2003.

The first query execute returns the XMLDATA (XML Schema) , but also the stored procedure update. The second run executes the stored procedure once again without your XMLData schema.

So disable your update in your stored procedure and generate your XML schema after that enable the update and delete the XMLData option.

Good to know that the Wizard runs the stored procedure twice......


Posted Thu, May 19 2005 5:42 PM by Robert Rijsdijk

Comments

Robert Rijsdijk wrote re: SQL Adapter Wizard Query twice
on Fri, May 20 2005 8:21 AM
This is one of the reasons why I hate the SQL adapter.....

Onother is that you have to modify the XMLDATA every time you generate a schema...

You can't correlate on a SQL schema....

Schema Names are obscure....

Transaction level is serializable...

Too many disadvantages to mention
TrackBack wrote re:SQL Adapter Wizard Query twice
on Wed, Jun 15 2005 2:47 PM
SQL Adapter Wizard Query twiceooeess
zithromax wrote zithromax
on Wed, Mar 21 2007 8:00 PM

news

Stored procedure getting executed twice | keyongtech wrote Stored procedure getting executed twice | keyongtech
on Thu, Jan 22 2009 4:53 AM

Pingback from  Stored procedure getting executed twice | keyongtech

Add a Comment

(required)  
(optional)
(required)  
Remember Me?

Please add 1 and 6 and type the answer here:
Copyright © 2003-2010 BloggingAbout.NET