Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Newbie: creating DB tables from XML.

From: MonicaFrintuMSFT@-----------.---------.---
To: NULL
Date: 4/2/2007 11:46:00 AM

Hello,

You xan use XMLBulkload component 
(http://msdn2.microsoft.com/en-us/library/ms171993.aspx) and use the 
SchemaGen property to generate the DB tables.

I hope this helps.

Regards,
-- 
Monica Frintu


"Bruce Wood" wrote:

> On Mar 24, 3:40 am, "BLUE" <blue> wrote:
> > Using Visual C# 2005, how can I programmatically create physical tables in a
> > DBMS from an XML schema or an XML file?
> > The only way is manually parsing the file to generate the "CREATE TABLE" SQL
> > statement?
> 
> Use ADO.NET to read the XML into an ADO DataSet. If the XML has an XML
> Schema, then you can use that to first create the table(s) in the
> DataSet with all of the columns having appropriate types.*
> 
> Then use the ADO DataSet to create tables in the DBMS.
> 
> * If you don't have a schema, your biggest problem will be determining
> the types of the data columns. For example, if an XML attribute says
> code="50234", is that an alphanumeric field, or an integer? How big
> can it get? etc. The XML Schema could give you answers to these
> questions, allow ADO.NET to create data columns with the correct
> types, and make the job of creating the tables in the DBMS much
> simpler. Without the schema, you might be forced to make every column
> a varying length string column.
> 
> 


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent