"Travis McGee" wrote in message news:eLS4%23jYAJHA.1228@TK2MSFTNGP02.phx.gbl... >I am getting "relationship expected on" errors on SQLXML Loading Code when >I > am creating the tables and then perhaps adding.inserting the data. > > Set oLoad = CreateObject("SQLXMLBulkLoad.SQLXMLBulkload.4.0") > oLoad.ConnectionString = gsConn > oLoad.ErrorLogFile = "c:\error.log" > oLoad.SchemaGen = True > oLoad.SGDropTables = False > oLoad.BulkLoad = False > oLoad.Execute "c:\schema1.xsd" , "c:\data1.xml" > > These files came from outsitde- many of them; for the purpose of bulk > inserting into the database. > What is the problem? Missing Annotation? Is SQLXML too picky? > Why do we have to touch all of the Schema files? Are there two different > standards? > > These are small files > http://www.HumanGenome.org/data/schema1.xsd > http://www.HumanGenome.org/data/data1.xml > is giving me....relationship expected on 'ING' > > and then > http://www.HumanGenome.org/data/schema2.xsd > http://www.HumanGenome.org/data/data2.xml > is giving me....relationship expected on 'COMBINATION_PACK_IND' > > This has something to do with missing annotation, I think. > > Can somebody help me > > Lilya Lopekha >
Your schema should specify the name of the table to populate the data with. In your case, it is missing. Look at the Bulk Load example here: http://www.sqlserverandxml.com/2008/08/sqlxml-lab-2-basic-xml-bulk-load.html and see the sql:relation element. It holds the name of the table to be filled with the data from the XML document. regards -- Jacob Sebastian SQL Server MVP http://www.sqlserverandxml.com "Travis McGee" wrote in message news:#MsAj4YAJHA.5632@TK2MSFTNGP04.phx.gbl... > "Travis McGee" wrote in message > news:eLS4%23jYAJHA.1228@TK2MSFTNGP02.phx.gbl... >>I am getting "relationship expected on" errors on SQLXML Loading Code when >>I >> am creating the tables and then perhaps adding.inserting the data. >> >> Set oLoad = CreateObject("SQLXMLBulkLoad.SQLXMLBulkload.4.0") >> oLoad.ConnectionString = gsConn >> oLoad.ErrorLogFile = "c:\error.log" >> oLoad.SchemaGen = True >> oLoad.SGDropTables = False >> oLoad.BulkLoad = False >> oLoad.Execute "c:\schema1.xsd" , "c:\data1.xml" >> >> These files came from outsitde- many of them; for the purpose of bulk >> inserting into the database. >> What is the problem? Missing Annotation? Is SQLXML too picky? >> Why do we have to touch all of the Schema files? Are there two different >> standards? >> >> These are small files >> http://www.HumanGenome.org/data/schema1.xsd >> http://www.HumanGenome.org/data/data1.xml >> is giving me....relationship expected on 'ING' >> >> and then >> http://www.HumanGenome.org/data/schema2.xsd >> http://www.HumanGenome.org/data/data2.xml >> is giving me....relationship expected on 'COMBINATION_PACK_IND' >> >> This has something to do with missing annotation, I think. >> >> Can somebody help me >> >> Lilya Lopekha >> > >