473,398 Members | 2,368 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,398 software developers and data experts.

Converse to BulkLoad...


I've an Annotated Schema file (XSD) which describes how data is laid out in
multiple tables in SQL Server.

I've a .Net application that creates an instance of the BulkLoad COM object,
and calls the Execute method, populating my tables using the XSD with my XML
data.

Question is, how do I use the same XSD to then read that data from the
database?

Thanks for your time.
Daniel.
Jul 5 '07 #1
1 2148
Thanks for your prompt reply.

The situation I have is that I'm using a generic "loader" which I pass XML
into, and using some XPath configuration, decide which XSD fits the XML and
loads the data into my tables. The Xml contains multiple levels and so I'll
be pushing data into parent/child/grandchild structured tables.

In my code, I also want some way of initiating a data "pull", so that on
some event, given some XSD, I'll pull the data from the database. I need the
XSD because in the compiled application I'll have no way of knowing the
table structure...

As I discuss this, I'm wondering about creating a "select" stored procedure
for each message type, which uses FOR XML to correctly format my text into
the XML I want. Then all I need is some event table which tells the compiled
application what new message I need to retrieve, which then lets me know the
sp I need to call...

What do you think?

Thanks,
Dan.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in
message news:OR**************@TK2MSFTNGP03.phx.gbl...
Daniel,

Well, you don't really need the XSD to read the data from the database.
You can just read the data from the field when you perform a select. You
can call the ExecuteXmlReader on the SqlCommand to get the data (make sure
that you use a FOR XML clause, or that you select one column, one row that
returns text/ntext/xml data).

Because you used an XSD to validate the data going in, you can assume
that the field only contains data which conforms to that XSD. You don't
have to worry about validating on the way out.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Daniel Bass" <da***********@blueCAPSbottle.comFIRSTwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
>>
I've an Annotated Schema file (XSD) which describes how data is laid out
in multiple tables in SQL Server.

I've a .Net application that creates an instance of the BulkLoad COM
object, and calls the Execute method, populating my tables using the XSD
with my XML data.

Question is, how do I use the same XSD to then read that data from the
database?

Thanks for your time.
Daniel.


Jul 5 '07 #2

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

Similar topics

0
by: Szaki | last post by:
I want to insert file xml to database. I configurate all files how to say on this web : http://support.microsoft.com/kb/316005/en-us and I have a error: 800A01AD (when I want to use a...
3
by: Kiran | last post by:
Hi, I want to back up my data in some table in SQL server and import it back using Bulk Load of SQL server 2K. I can use the following code to backup the data in XML ...
1
by: John | last post by:
Does .NET have XML bulkload function to load data into SQL server? or do I have to use SQLXML library? If there is, please help with directions. Thanks
0
by: Arulraja S via DotNetMonster.com | last post by:
hello all, hope this is the right place to post this question. My problem is that I cannot import xml files using bulkload . The Give error shown An unhandled exception of type...
5
by: vicpada | last post by:
Hi all, I am newbie in all the stuff about xml importing into sql server. What I try to do is simple. It is take an xml file and drop it into a table. I am using VS2005, SQLXML 4.0 and...
0
by: =?Utf-8?B?Sm9iIExvdA==?= | last post by:
I am using BulkLoad from .NET application as follows SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class obj = new SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class(); obj.ConnectionString =...
3
by: Don Miller | last post by:
I have a bizarre problem when I try to validate XML documents and their schemas once they have been opened and transfered to a Visual Web Developer 2005 Express project. I receive validation errors...
1
by: Daniel Bass | last post by:
I've an Annotated Schema file (XSD) which describes how data is laid out in multiple tables in SQL Server. I've a .Net application that creates an instance of the BulkLoad COM object, and calls...
2
by: pablox | last post by:
Hi, durin importing data via bulk load copy componet appears error 'nvarchar' is not a recognized built-in function name. I have around 200 xml files and schemas for importing to SQL Server but...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.