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

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Create multiple XML files from a single query

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


I'm using this code for creating and xml file out of a SQL2005 table:

select (select 
    from ProductsInfo_ZAP p
    for xml path('PRODUCT'),TYPE, ROOT('PRODUCTS')
) for xml path(''), ROOT('STORE')

Is there a way for me to create multiple xml files, one for every row, going by the primary key column, or do I have to create a separate query for each row?

I would also wondering what is the syntax for transforming this query into a stored procedure


View Complete Post

More Related Resource Links

Running a single SQL update query on multiple foxpro databases

Hi, Env : SSIS 2008 My requirement is to run a update SQL statement on multiple foxpro databases. The fox database paths are available in a SQL server table.  I've created a for each loop control and assigned the database path to a variable named dbpath. Within the loop, I added an "execute sql task" control. Now what properties are to be set to get the requirement done. Appreciate any help. Regards. BH  Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful. BH

How to create single wsp for multiple projects sharepoint 2010 solution

We have multiple projects (4 projects) in single sharepoint 2010 solution. We want to create single wsp deployment for this. But when I right click on any project, it creates package means wsp on its own. How to create single wsp for multiple projects sharepoint 2010 solution? Is wsp builder which we are using for sharepoint 2007 project (works really great) also works in sharepoint 2010?

Inserting multiple records under the single query

Hi All,       I have to insert a multiple records under the single table.So i have to execute the command in the frontend for every records. Inorder to avoid i write the query like this   insert into table1(field1,field2) values('1','Test1'),('2','Test2'); and also i tried insert into table1(field1,field2) SELECT "1","Test1" Union all SELECT "2","Test2" But I am getting syntax error. How to insert a multiple records under the single query???...

How do I create a query that joins two tables and returns a single entry with the most recent update


Say I have the following two tables (Purchase & Customer). 

CustomerID StoreName PurchaseDate
1 Asheville 9/14/2010 15:49

Can a single form create multiple entrys in a custom Sharepoint list



I want to have a form where the user can specify how many items she wants to create for a custom sharepoint list? When submitting the form, that will start creation of X number of new items in a custom Sharepoint list.

Is this doable with forms?



How can I create multiple files all referencing the same aspx page?


 Basically I need multiple code-behind files each containing different functions for a page. Different classes do not do this because they are not connected to the page so their methods require parameters I want direct control of the page without the need for parameters.

I can only seem to crete one code-behind file and I need many. I've tried putting the aspx page in the App_Code folder but this causes an error.

Is there a way to do this?. Any help would be appreciated.

upload multiple files from a single upload button i infopath form


Hi all

        My Infopath form contains an image upload button . Is it possible to upload multiple files at a time from the same upload button.




Can a single Parameter be used for multiple columns in the query.


Hi all,

I was trying to create a report with a slight different kind of requirement,

Actually I have 5 Columns in a table from which I want the user to be capable to view the data based on any combination for those columns.

For Example:

I have a table Employee with attributes: Name / Age / Salary / STATE

Now I want the user to be capable of selecting any combination for these columns and then running the report, Actually the report will behave like a Select Query with Where clause with AND conditions for all columns.

Report design should be like this:

FIRST prompt:   Select Column name  ex: AGE

SECOND prompt:   Select Column Value ex: 30

(now store this value somewhere and allow the user to again select a different column name like STATE, and the SECOND prompt will show all distinct STATEvalues, then user selects for ex: NEW YORK

Then when USER clicks VIEW REPORT:

Show all the employees where AGE = 30 and STATE = NEW YORK.

Is it possible ? as I dont want to create 10 prompts for 5 columns separately.

Any help is appreciated.



how to create multiple dimensions on single parent column


How i cant create multiple dimensions on single parent column? 

This is the senario


Workflow fact table

Wf_id (int)






Department Dimension Table




Now if i create dimension from dimdept , it have only one department name column, how i can use this same lookup to represent the service and source department names? Same senario pops up in sales fact tables as well , like manage_id and salesman_id both looks up to same parent table "Emp_id"

Multiple manifest files for a single feature

How can I include multiple manifest files in a feature using visual studio 2010? I tried adding Empty element and it comes with a single elements.xml file. If I want to add one more, it does not seem to be recognizing the new manifest file that I created. Any pointers?

SQL 'FOR XML' query - multiple blocks within single block


Hello All

I am trying to write a SQL 'FOR XML' query that produces an XML block in a specific xml format.  The query I have so far is close but I am having problems getting it produce the exact xml format that I need.  I hoping someone on here can help me.

Using the following SQL, I populate the table against which, the SQL FOR XML query is run:


 F_id   INT  NOT NULL,
 B_id   INT  NOT NULL,
 Name   VARCHAR(500) NOT NULL,


insert Bmk (F_id,B_id,Name,Start_date,End_date)
values (128,332, 'Item1','2000-07-01T00:00:00', '2079-01-01T00:00:00')

insert Bmk (F_id,B_id,Name,Start_date,End_date)
values (128,333, 'Item2','2000-07-02T00:00:00', '2079-01-01T00:00:00')

insert Bmk (F_id,B_id,Name,Start_date,End_date)
values (130,334, 'Item3','2000-07-03T00:00:00', '2079-01-01T00:00:00')

insert Bmk (F_id,B_id,Name,Start_date,End_date)
values (138,342, 'Item4','2000-07-04T00:00:00', '2079-01-01T00:00:00')




Then I run the following query:

  F_id as  'F_id',

merging multiple tables in a single dataset to single table


 i have a stored procedure which returns three tables to a dataset ..... now i need to merge all three tables to a single table from d same dataset 

like dataset1 has table1 table2 and table3 .... i want all the three tabels to be merged into dataset1 itself .... instead of three diffrent tables so that i can show all three table data in a single datagrid  as a compact data and combination of 3 tables from d single dataset.....

can some1 help me please.....

Toolbox: Easy File Backup, Exploring Files And Folders Inside Visual Studio, Multiple Monitor Softwa


If the responsibility for creating, managing, and executing routine backups is yours, these tools will make it easier. Also see how you can browse folders and files from inside Visual Studio.

Scott Mitchell

MSDN Magazine May 2009

Upload multiple files in asp.net

The article Upload multiple files in asp.net was added by habdulrauf on Friday, July 09, 2010.

Some times we need to allow user to upload as many files as he/she wants instead of fixed number of files.So here is the procedure to achieve this. Idea is taken from Joe's video.%@ Page Language="C#" AutoEventWireup="true" CodeFile

how to set multiple button in single image


Hi friends,

I need to make multiple button in a single image in asp.net.

and need coding also for vb.net.

thanx in advance

single form multiple buttons in MVC


In a single page  has two buttons , ddown and tempname.

I wrote two actionresult separetly each one for ddown and tempname.

I need one is post and another one is get method. so i gave like

1. Get Method


        [AcceptParameter(Name = "button", Value = "tempname")]
        public ActionResult ddown_tempname(string statusName, NewsLetterAdminViewModel viewModel)

return View();



2.Post Method


        [AcceptParameter(Name = "button", Value = "ddown")]
        public ActionResult ddown(string statusName, string button, NewsLetterAdminViewModel viewModel, FormCollection collection)

return View();



if i call the post method its worked well. but if i call the get method, the code does not execute. the brea

using single function to open multiple colorbox


Hi I have li like this

<li class="game">
                                    <div class="game-thumb">
                                        <a href="include/games/words.swf" class="gamelink">
                                            <img src="include/games/words.jpg" /></a></div>
                                    <div class="thumb-desc">
                                <li class="game">
                                    <div class="game-thumb">
                                        <a href="include/games/cat.swf" class="game2">
                                            <img src="include/games/dots.jpg" /></a></div>
                                    <div class="thumb-desc">
                                        Trap the CAT</div>
                                <li class="game">
                                    <div class="game-thumb">
                                        <a href="include/games/gravitymaster.swf" class=&qu
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