473,387 Members | 1,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

selecting XML from SQL2000 and using it in ASP.NET

Don
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
Nov 12 '05 #1
1 1036
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" <do*************@hotmail.com> wrote in message
news:Oa*************@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

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: LizP | last post by:
Hi, guys - looking for a bit of help/advice on moving a database from SQL 7 to SQL 2000. We've a third party application which currently uses a SQL7 database. This database has a number of views...
8
by: rgonzale6 | last post by:
Hello. I'm using SQL query analyzer to run some queries against an SQL2000 DB. Unfortunately, my previous SQL experience is some Oralce SQL I took in school. To put it simply, I'm trying to...
4
by: manning_news | last post by:
Using SQL2000. How do I format my select statement to choose one out of 24 different tables? Each table is slightly different and I was hoping I could use one select statement and format it...
3
by: Dizzzz | last post by:
I am creating a front end that will access a SQL database and I want to create a DROP DOWN control that will display the databases and tables available from a SQL2000 server. Much like the one in...
6
by: David Waz... | last post by:
Moved an app from W/2000 Asp V1.0 to W/2003, VS/2003, ASPV 1.1 Page runs a long job, uploading 2 large fixed length files (300,000 rows) into SQL database. A process is run against the data,...
2
by: bk | last post by:
This is driving me crazy. I get "SQL Server is unavailable or does not exist" error while developing asp.net application in vs2003's IDE development mode but when I install the application on the...
12
by: Robert Bravery | last post by:
HI all, I downloaded vbexpress and am trying to connect to my sql 2000 server, but keep on getting this error messag: "An error occured while establishing a conenction to the server. When...
2
by: PointMan | last post by:
i make a project in vs2005 that use ASPNETDB.MDF and use <asp:LoginView ID="LoginView1" runat="server" > server control for vs2005 in this case , i'd like to use hosting service but this...
0
by: basuritta | last post by:
I am trying to add a SQL2000 subscriptor to a SQL2005 publisher and distributor using the Management Studio. I'm using a non-standard port in both ends, but I have set the port for the TCP/IP...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.