query "For XML" problem?...or not!

hi guys

 i'm developing a multi-tier web application which at a given point calls a stored procedure that returns data formated as XML ( 'select ..... for xml auto' basically).

That SP returns a list of tasks allocated to 1 or more resources.

 The problem is that from time to time (and that is totally random, anything from 30seconds to 10mins) whenever the code calls that SP, the XML structure isn't there, so no data is listed.

Question is: is this a problem within SQL Server XML support or anything related to .NET?

I'm using .NET 2.0.50727 with VS2005 8.0.50727.42, and SQL Server 2005 and IE 6.0.2900

Also, if i refresh the browser and go to the Task listing page, the list comes back again!

Note that i'm NOT using SESSIONs in ANY point, so this has nothing to do with sessions.

TIA

 

Sérgio Charrua
www.pdmfc.com
Portugal


 

0
scoelho
9/1/2006 4:46:33 PM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

2 Replies
382 Views

Similar Articles

[PageSpeed] 21

Hi Sergio,

SQL Server XML support is very useful for some issues. But It isn't scalable solution.

Good Coding!

Javier Luna
http://guydotnetxmlwebservices.blogspot.com/

 


from Villa El Salvador for world!
0
Javier
9/1/2006 9:26:13 PM
It's diffcult to figure out what's causing the problem. From SQL side, if a SP returns XML data, it just returns a binary stream to the client as other returned data. I suggest you open SQL Profiler to trace the SQL Server when the prolbem repros, so that you can clarify whehter SQL returns expected result set or empty (none) result, or maybe some network issue.
Welcome to my SQL/ASPNET forum for Chinese
http://51up.org/bbs/forumdisplay.php?fid=38
0
Iori_Jay
9/4/2006 3:34:57 AM
Reply:

Similar Artilces:

regarding "in" and "=" in a SQL query
Hi, I am using a sybase database client . When i use "in" in a complex nested query say "select * from emp where emp_id in (select emp_id ..........)" then the execution time is really slow but in the same nested query when i use = as in "select * from emp where emp_id = (select emp_id ..........)", then the query is fast. Is there any particular reason for the same? Regards, Supreeth The obvious difference is that the "=" implies that the subquery can only return a single value as opposed to the "in" which implies that th...

How to give "And" and "OR" in my sql query?
      My layout (.aspx) have 3 TextBox and 2 Dropdownlist and 1 Button which just looks like Search KeyWord 【Texbox1】DorpDownList1 (have 2 items "And" and "Or")  【TextBox2】DorpDownList2 (have 2 items "And" and "Or") 【TextBox3】 Button ( this Button is for submit query)   1 "txtQuery" style="Z-INDEX: 101; LEFT: 152px; POSITION: absolute; TOP: 32px" runat="server" 2 Width="264px"> 3 "ddlBoolean" style="Z-INDEX: 102; LEFT: 152px; ...

Multiple "AND" and "OR" Statements in an SQL Query
Hello,  I've got a table called "plants" which, up-until-recently, was being searched by category using the following SQL (and using the CategoryID field): SELECT plants.Latin_Name, Size.ekm_ID, plants.Common_Name, plants.Short_Description, plants.Thumb_URL, plants.CategoryID, plants.ProductID, Size.Size, Size.Price, Size.MostPopular FROM plants INNER JOIN Size ON plants.CategoryID = Size.CategoryID AND plants.ProductID = Size.ProductID WHERE (plants.CategoryID = @CategoryID) AND (Size.MostPopular = 'True') AND (Size.Availability = 'True') ORDER BY plants.Latin_Name  I now want ...

Problem in SQL Query "= ?"
I am following a tutorial for filtering from here : http://www.exforsys.com/tutorials/asp.net-2.0/asp.net-2.0-gridview-filtering.htmlIn the step of selecting the WHERE clause, when i select a column operator and control, my SQL expression shows : [ClientName] = ? and my value shows me tbcname.Text The value part is fine, but whats wrong with my = ? expression .. shouldent it be  [ClientName] = @ClientName.Please Help. Thanks in advance.  Sorry for posting in the wrong catagory. Just a heads up. I use an MS Access DB. Hi Dhanesh ,   Based on my understanding,&nb...

Is there a "Starts With" or "Contains" I can use in my SQL query ??
Hi,   I have a piece of code written where I am trying to pull out certian fields based on them containing a certain letter eg C or S ???? Is there a simple piece of code I can use for this. At the moment I am using "AND sl.Name IN ('CDL') " & _.......but this will not return the rows that contain CDL ?  Any Ideas much APPRECIATED ?  You would use the LIKE keyword for that:http://msdn.microsoft.com/en-us/library/ms179859.aspxLike "AD sl.Name LIKE '%CDL%'"That will return anything where that name has CDL in it. Cheers, &nb...

Problem with using dynamic SQL to "CREATE XML SCHEMA COLLECTION" in SQL 2005
This works in SQL Server 2005:CREATE XML SCHEMA COLLECTION Version2_1 AS'<xs:schema xmlns="http://www.icpsr.umich.edu/DDI"     xmlns:xs="http://www.w3.org/2001/XMLSchema"    xmlns:doc="http://www.icpsr.umich.edu/doc"     targetNamespace="http://www.icpsr.umich.edu/DDI"    elementFormDefault="qualified" attributeFormDefault="unqualified">    <xs:annotation>        <xs:documentation>     &n...

Problem with "isc_service_query" and "isc_info_svc_get_license" +"isc_info_svc_get_licensed_users"
I have problem with getting a correct result from "isc_service_query" when I pass "3A" (Get license and licensed_users), in fact I get an "Unexpected Output buffer value" error when IBX tries to read the license information from the result. From the debugging I have done it seems like I dont get the correct result from Interbase. Looking at the result I see that I get a correct value on "isc_info_svc_get_licensed_users", but the rest of the buffer is filled with zeros where I expect to see 0x33 and information about licenses. I am using...

Getting Month" january" instead of "1" in SQL query
Hi Problem solvers The Usertravelactivity table on which i run this query has Columns like CreatedDate (as Datetime) Here is my Query SELECT SalesUserID,Month(CreatedDate) as Month FROM UsertravelActivity Where Month(CreatedDate) In('10','11','12') And Year(CreatedDate)=@Year1 and SalesUserId =@SalesUserID union all SELECT SalesUserID,Month(CreatedDate) as Month FROM UsertravelActivity Where Month(CreatedDate) not In('10','11','12') And Year(CreatedDate)=@Year2 and SalesUserId =@SalesUserID END The outPut now i get is: SalesUSerID ...

What´s the purpose of "classifieds-categories.sql" "classifieds-add.sql""classifieds-remove.sql"?
 Hello all, what´s the purpose of the scripts I enunciated above on the classified starter kit?  "classifieds-categories.sql"  seems to create the initial parent categories, the others 2 names sugest they are used to add and remove ads, but i cant get how.There are 10 types of people in this world:Those who understand binary and those who don't. The classifieds starter kit is ready for upload right out of the box. Any .sql files you find in App_Data are scripts of the database.They are there to make it easy for uploading your site. So if you were not mak...

Query performance of "=" vs "<" and ">"
Suppose you have a large table (>5 million records) containing 15 columns including a numerical string column called ACTIVITY_DATE which is indexed (nonunique, nonclustered) and a numerical string column called TIMESTAMP which is indexed (nonunique,nonclustered). ACTIVITY_DATE contains a date string ('20081211'); TIMESTAMP also appends a time ('20081211 19:18:03.34923'). Suppose you want to return all events that took place on December 11th and suppose you had to choose between the following queries: - select col1,col2,col3 from TABLE where ACTIVITY_DATE='2...

Query performance of "=" vs "<" and ">"
[This is a repost from ase.general] Suppose you have a large table (>5 million records) containing 15 columns including a numerical string column called ACTIVITY_DATE which is indexed (nonunique, nonclustered) and a numerical string column called TIMESTAMP which is indexed (nonunique,nonclustered). ACTIVITY_DATE contains a date string ('20081211'); TIMESTAMP also appends a time ('20081211 19:18:03.34923'). Suppose you want to return all events that took place on December 11th and suppose you had to choose between the following queries: - select col1,col2,col...

.ALLCOL("%COLUMN%", " ", ", ", ", ")
Do you know anyway for me to exclude a subset of columns returned by this function. We have two columns (rec_user and rec_datetime) which are in all of our tables, but when generating triggers I want automatically generate a script which does not include those two columns but does include all other columns in that table. Bruce I should add that I am using PD 9.0.0.580. Bruce "Bruce Lamb" <lamb.bruce@mayo.edu> wrote in message news:6HgI315nCHA.155@forums.sybase.com... > Do you know anyway for me to exclude a subset of columns returned by this > function. ...

Precedence of "where" ("of", "is", "will")?
Nobody on #perl6 today could answer this one. Is: Str | Int where { $_ } the same as: (Str | Int) where { $_ } or: Str | (Int where { $_ }) ? Followup questions, Mr. President: What kind of operators are "where", "of", "is", and "will"? Is there a reason that S03 doesn't list them? What are their precedence(s)? -- Chip Salzenberg - a.k.a. - <chip@pobox.com> Open Source is not an excuse to write fun code then leave the actual work to others. Chip Salzenberg writes: &...

Access Query Using Like "*" & [@input] & "*" Problem!
Dear Readers, I have a query that I input values to and return results. In my query criteria I have Like "*" & [@input] & "*" . When I run the query in Access everything works fine. It returns results for everything that matches "chr" which includes "chris","Christine","christ", etc.... When I run the stored procedure in asp.net it returns no results and no errors? Any suggestions???? try objcmd.connection.open() objreader = objcmd.executereader while objreader.read respo...

Web resources about - query "For XML" problem?...or not! - asp.net.sql-datasource

Resources last updated: 12/4/2015 6:30:46 AM