selecting XML from SQL2000 and using it in ASP.NET

I am running this in SQL Server 2000:
SELECT lastname, firstname, title, hiredate
FROM employees
FOR XML AUTO

I get back these results in the Query Analyzer:
<employees lastname="Jones" firstname="James" title="Developer"
hiredate="2004-05-10T00:00:00"/><employees lastname="Jordan" firstname="Ken"
title="Sr. Developer" hiredate="2004-05-03T00:00:00"/>

But in a webform, when I call the ExecuteXMLReader and do a Response.Write
white looping through the reader, I only get back the first node.

Any reason for this?  It doesn't make any sense.

My intention in all this is to select SQL DATA in XML, Deserialize the XML
into a class, Manipulate and instance of that class, and send the resulting
XML back into the Database to commit the changes.  If you have done this,
please point me to some resources.

Thanks,

Do


0
9/10/2004 12:50:38 AM
dotnet.xml 7266 articles. 0 followers. Follow

1 Replies
429 Views

Similar Articles

[PageSpeed] 29

Don,
    Since you are moving the data back into the database, why don't you just 
use a dataset, or datatable object and a dataadapter. You can make the 
changes and then you only need to call the update method on the dataadapter. 
What is the purpose of using the "for xml auto" syntax in flat table?
Jared


"Don" <doduong12141214@hotmail.com> wrote in message 
news:Oai5xAtlEHA.712@TK2MSFTNGP09.phx.gbl...
>I am running this in SQL Server 2000:
> SELECT lastname, firstname, title, hiredate
> FROM employees
> FOR XML AUTO
>
> I get back these results in the Query Analyzer:
> <employees lastname="Jones" firstname="James" title="Developer"
> hiredate="2004-05-10T00:00:00"/><employees lastname="Jordan" 
> firstname="Ken"
> title="Sr. Developer" hiredate="2004-05-03T00:00:00"/>
>
> But in a webform, when I call the ExecuteXMLReader and do a Response.Write
> white looping through the reader, I only get back the first node.
>
> Any reason for this?  It doesn't make any sense.
>
> My intention in all this is to select SQL DATA in XML, Deserialize the XML
> into a class, Manipulate and instance of that class, and send the 
> resulting
> XML back into the Database to commit the changes.  If you have done this,
> please point me to some resources.
>
> Thanks,
>
> Do
>
> 


0
9/11/2004 2:55:14 AM
Reply:

Similar Artilces:

How can I add transaction while using the online version of money
Ok... when I first bought Money several years ago and installed it on my home computer, I could then login while at work via the passport and see the information that I had entered on my home computer. If I purchased something during the day I could go online and add the transaction which was great way to know at any given moment what my TRUE balance was in my account. Now when I check my Money account online from work I can see all the information I've entered at home but now there is no way to add a new transaction other then from my home computer where I have Money installed. ...

use displayed value in calculation
quick question - if I perform a simple calculation of =(a1+b1) in the m1 cell, and then need to use that result in another calculation in the n1 cell =(m1*3.14), why do I get a value of 0.00 returned? michae What values are in cells A1 and B1? A small number, showing two decimal places, could display as 0.00 michael wrote: > quick question - > > if I perform a simple calculation of =(a1+b1) in the m1 cell, and then > need to use that result in another calculation in the n1 cell > =(m1*3.14), why do I get a value of 0.00 returned? > > > > michae > -- ...

importing text file into excel file using macro
Hi, How to import text file into excel file using Macro? Can this proces run on form menu button? Please help and give me some ideas of doin it. I have attached a text file for your reference. Thanks, An Attachment filename: rdata.txt Download attachment: http://www.excelforum.com/attachment.php?postid=66130 -- Message posted from http://www.ExcelForum.com >Hi, >How to import text file into excel file using Macro? Can this process >run on form menu button? Please help and give me some ideas of doing >it. I have attached a text file for your r...

Can I set up a calendar lookup for date selection
Is it possible to lookup a calendar for date selection on a cell. I cannot find any reference to it in the help. try this url http://www.fontstuff.com/vba/vbatut07.htm ================= "Tangoxray" <Tangoxray@discussions.microsoft.com> wrote in message news:72D4DB63-1D7F-477A-93C7-2F767A207B26@microsoft.com... > Is it possible to lookup a calendar for date selection on a cell. I cannot > find any reference to it in the help. ...

Using AutoSum Button results in miscalculations
I have a workbook that has a couple hundred worksheets in it and one o the worksheets is pulling values (via formulas) to it from many of th other sheets. Now, all the values have apparently pulled ove correctly, but when I run an AutoSum totalling all of the values i adds them incorrectly. I verified this by using a calculator and b retyping all the numbers in the next column in the worksheet and usin AutoSum to total those numbers. What could cause this? Is there a rounding problem somewhere? I hav double and triple checked my formulas and they are all correct. I jus don't understa...

Error: ".....doc uses a file type that is blocked from opening in this version
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel The file sent to me seems to be a 97 to 2004 version. I cannot understand why there would be any difficulty in opening a previous version document of word in mac 2008. I have tried changing the .doc file to a .docx but it doesn't work. Hoping for some help, thanks. How are you "changing" the file if you can't open it? Simply altering the extension does *not* change the file type & makes matters worse by misinforming the program as to what type of file it actually is. Make sure your...

Excel 2002
....I have a large amount of amount to produce multiple charts from, so using Autofilter is a bit of a necessity. Using the Chart Wizard, I can easily select the filtered data range but it doesn't seem possible to select the (filtered) headings as the X-axis (time period). Any ideas or workrounds? Thanks in advance, Amanda when you set up your autofilter range leave the row you want to use for your axis out of the range. "Birmangirl" wrote: > ...I have a large amount of amount to produce multiple charts from, so using > Autofilter is a bit of a necessity. Using the...

transfering data using Ole
I am using Excel 2000 to generate spreadsheets that I then "cut & paste" to a CAD program. When I use my desktop computer that has Excel 2000, a portion of larger spreadsheets truncates. I have found that if I use Excel 2003 (on my laptop), I can "cut & paste" the entire worksheet into my CAD program without a problem. I have heard that this also works with Excel 2002. Because Excel 2000 and Excel 2003 spreadsheets are fully compatible, this is clearly a function of how data is handled by the two versions of Excel or the Ole interface. Is there an update or a w...

SOAP xml
Fedex in the US is changing their method of dealing with their servers for submitting packages, tracking , etc. The old method was a formatted Xml file submitted via an HTTP Post. You then parsed the returned Xml that contained the information requested. Now they are phasing that out in favor of a web service using WSDL SOAP messages. I took one of their VB.Net samples and have sucessfully tracked packages and received Proof of Delivery Pdf files. However I have a problem when I deal with Fedex tech support when I have questions about some of their other services, for example Address ...

Cannot see receipients in global list while using OWA
I have exchange 2003 with outlook 2003 as client. Whenever I use OWA and try to create new email and click on TO to select receiver's name from the global list, I get a differnent screen which as me to enter name to search. I want to display names so I can select from the list. Here is the screen that I get each time I click on TO. I should be seeing everyone's name so I can select. If I connect locally, I do get the list and there is no problem. This happens only with OWA. Thanks -------------------------------------------------------------------------------- OWA d...

move selection after enter into cell
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Upon entering data into a cell, I do not want to move to another cell when I hit Return. In the older version of Excel I used to be able to go into Tools/Options/Edit and uncheck Move Selection after Enter. How can I accomplish this in the 2008 version? thanks Aha - you've revealed yourself as a Windows user :-) Mac OS has never had Options, it uses Preferences instead. Go to Excel> Preferences> Edit where you can specify Up, Down, Left, Right from the list or clear the check to not have the se...

LINQ to XML and Amazon Webservices
Hi, I'm having a hard time in using LINQ on XML returned from Amazon Webservices. I'm using the 2008 beta 2 on an XP machine. the code I'm using is: ========= Dim s As String s = "http://ecs.amazonaws.com/onca/xml?" & _ "Service=AWSECommerceService&" & _ "AWSAccessKeyId=1234&" & _ "AssociateTag=my-tag&" & _ "ResponseGroup=Small&" & _ "Operation=ItemSearch&" & _ ...

Option to select printer B4 printing Payables Checks
Client recently upgraded from 7.5 to 9.0 and they lost the option to select a printer after clicking print. From print payables checks In 7.5 when they would click on print, a window would pop up and give them the option to select a printer to send their checks to. Now it automatically goes to their defaulted printer. How do they set up the option in 9.0? Go to the Named Printers settings, and look at the checkbox to suppress the printer dialog box. This should solve your problem Best regards Mike "TROOTBMI" <TROOTBMI@discussions.microsoft.com> wrote in message news:...

Default Signatures using Outlook Web Access
Because I primarily access email via Outlook Web Access (do not use desktop version of Outlook), I would like to have new/reply messages in OWA default to use a standard signature. I know how to set this up with the desktop version of Outlook. I have also seen how a signature can be picked if your desktop version of Outlook is "configured and runnable" when you are using OWA. However, can a standard signature be set up when only using OWA? Thanks, I would appreciate any help. What version of Exchange are you using? Exchange 2003 OWA offers a default signature. There are a...

.NET Classes: Visio Pro without VS
Hi, I own Visio 2007 Professional, but I do not own Visual Studio -- I only have the Express editions. Because of that, I cannot reverse engineer from Visual Studio to get .NET classes into Visio. How can I get .NET classes into Visio Pro 2007 without the functionality of an entirely separate product? Thanks, John Unfortunately, you have no way to do it in Visio 2007. You will need to have visio 2003 for enterprise architect, reverse and use it in Visio 2007 Enjoy with Visio. <jar349@gmail.com> a �crit dans le message de news:7066a237-0f2d-464b-ba43-5ad053e8dcb4@d4g2000prg.googleg...

Chunking out data from a huge xml file (Ajax)
Hi I am faced with quite a challenge. I need to open a 70-100 meg file and be able to chunk it out using AJAX back to the client but that isn't my problem really. What I need to do is open the file and get pieces of it out without loading the entire thing into memory. The pieces themselves are random although of a fixed size. If I tried to read an entire file into a stirng and parse pieces out I use too much memory and if I use the xmlTextReader and the skip method my memory problems are solved but it creates a huge performance issue. If I don't have to I don't want to ...

Using sdk to find out if an Account already exists
Hi, Want to use sdk to see if an Account already exists , all i have is its name. I've looked at Retrieve method but it requires the Guid. Any equivalent call to Retrieve that just takes name? Or a way to get the Guid from the name? Sample code would be great if available. Thanks for all help. John Hi John, The method you are looking for is RetrieveMultiple as only the guid search gives the certainty to retrieve only one record. All explanations are in the sdk but as the sdk sample is nearly the exact code you want, here it is : // Set up the CRM Service. CrmService service =3D new ...

What formula to use?
I have a list of teams in column B. In a tab called Division I have 6 division names with the teams listed in their respective division. I want column C to enter the appropriate division name for the division the team is in. For example, I want column C to be labelled as AL EAST when column B has BOS in it. How do I do this? Thank you. =INDEX(Division!A:A,MATCH(B1,Division!B:B,0)) etc. -- HTH RP (remove nothere from the email address if mailing direct) "Jambruins" <Jambruins@discussions.microsoft.com> wrote in message news:3100394C-BF57-470D-A218-BCA9C85D8D54@mi...

MSDN Universal & use of CRM 1.2
We have MSDN Empower program subscription. The license explicitly permits use of SBS and Exchange for real world use - not just development. This is unusual for MSDN as I understand. I can't find definitive confirmation if CRM is also permitted for actual use under Empower, or not. If it is, can we add licenses to the MSDN Subscriber organization ? John m. John, Try the M$ action pack, $299 US. http://members.microsoft.com/partner/salesmarketing/partnermarket/actionpack/actionpackus.aspx <snip> The Microsoft Action Pack Subscription is designed to provide you with the essentia...

How can we use 2 domains?
We redistered 2 domains 1. xyz1.com 2. xyz2.com On one office we are using xyz1.com with win2003 server. xyz is working fine. We have 2nd office on different location can we use same machine for 2nd domain name? On 26 Mar 2007 01:35:23 -0700, "@smi" <imaasim@gmail.com> wrote: >We redistered 2 domains >1. xyz1.com >2. xyz2.com >On one office we are using xyz1.com with win2003 server. xyz is >working fine. >We have 2nd office on different location can we use same machine for >2nd domain name? http://www.google.co.uk/search?hl=en&q=recipient+policies&a...

Using a named range as a data source for a chart
Hi, I'm trying to build a chart that that has a named range as its data source. The named range refers to a table that is 2x3 and is called geographydata. Is there any way that I can have the source data for the graph to be geographydata? Thanks! Michael You can enter the name, preceded by the worksheet name and exclamation point, for the data range, but Excel will convert this name to its cell address. If you want the chart to be dynamic as the name changes its size, you have to define a name for each series' data. This will not dynamically change the number of series in the ch...

Creating GIFs in Excel 2003 for use in Dreamweaver
I have used Excel in the past to create GIF files of charts to be uploaded to the Web through Dreamweaver without difficulty. Using Excel 2003, however, GIF files that I create by "saving as web page" turn out fuzzy when posted to the web. (They look fine when copied to Word or Paint -- haven't tried Photoshop.) This is true whether I use a chart from an old file created in an earlier version of Excel or a new chart built from scratch in the Excel 2003. I've looked through the chart settings to see if my new version of Excel is configured differently from the old, ...

Selecting data for charts by criteria
Hi there, I am in control of a large database of information and I want to be able to automatically make my charts update to include new data that is added. I am using a regular excel spreadsheet. I would also like to be able to select which data is used for a chart depending on a criteria such as, 0 <= value <= 10. Any help is appreciated. Thanks Tim Archer ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ Tim - If it's an external database, I guess yo...

how to use Excel
you mum has a hairy dick retard <retard@discussions.microsoft.com> wrote: > you mum has a hairy dick Apt username. -- Brian Tillman [MVP-Outlook] "retard" wrote in message news:4C17CB98-6481-4A75-B758-249D29C022C7@microsoft.com... > you mum has a hairy dick webnews-for-dummies interface childish post flamer homosexual (most likely a boy jerking to online porn) fixates on mommy So we have a webnews-for-dummies child that admits to being a flaming homosexual retard with a mommy fixation. A case in point for arguing retroactive abortion. ...

Can Excel use addresses to create points on a Map?
I am trying to create a Graph from a bunch of addresses and have them show up on a map of California/U.S.A. I was wondering if anyone has done that and can help me. Hi, Excel does not have such a feature. -- Sorry, Shane Devenshire "Nate" wrote: > I am trying to create a Graph from a bunch of addresses and have them show up > on a map of California/U.S.A. I was wondering if anyone has done that and > can help me. On Wed, 26 Sep 2007, in microsoft.public.excel.charting, ShaneDevenshire <ShaneDevenshire@discussions.microsoft.com> said: >Excel does not h...