c# - SQL XML Bulk Load Error when I try to create and populate database table -
i´m working xml data have lot of xsd files. load data database (i need create tables xsds) cannot use, xsd2db (because xsds contain union , list), neither ssid project. tried bulk load there error: schema: multiple base derived type on nilreason not supported (hresult>0x80004005).
can me how solve problem?
thanks lot!
below c# code , url xsd http://www.cuzk.cz/generujsoubor.ashx?nazev=10-axsd (which distributed czech office surveying, mapping , cadastre); main xsd file in zip in path: *...\ruian\xsd\vymenny_format*
sqlxmlbulkload4class objbl = new sqlxmlbulkload4class(); objbl.connectionstring = "provider=sqloledb;server=mypc\\sqlser; database=test;integrated security=sspi"; objbl.bulkload = true; objbl.schemagen = true; objbl.sguseid = true; objbl.checkconstraints = true; objbl.forcetablelock = true; objbl.keepidentity = false; objbl.errorlogfile = filepath + "\\project_errors\\error.txt"; objbl.execute(@"d:\data\ruian\xsd\vymenny_format\test.xsd", @"d:\data\ruian\xsd\vymenny_format\test_data.xml"); objbl.execute(@"d:\data_ruian\ruian\xsd\vymenny_format\vymennyformattypy.xsd", @"d:\data_ruian\data\20130430_ob_500071_uksh.xml");
not possible xsd can translated automatically in database schema - afraid in 1 of cases.
you'd have create database table manually , map xml them.
Comments
Post a Comment