473,378 Members | 1,037 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,378 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 1243
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 ...
4
by: simon | last post by:
I created a reference in my project to SQLXMLBULKLOADLib. Then I create an instance: SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class bulkLoadObj = new SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class(); ...
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.