[AccessD] Read XML File Using xsd Schema File

Paul Hartland paul.hartland at googlemail.com
Fri Dec 4 08:35:04 CST 2009


Thank you Jack, will look into it.


Paul

2009/12/4 Jack and Pat <drawbridgej at sympatico.ca>

> Paul,
>
> No direct involvement in xml, but I did have some issues  previously and
> found Tek-Tips xml forum quite helpful. I did find this M$oft example of
> bulkload
> http://msdn.microsoft.com/en-us/library/aa225754%28SQL.80%29.aspx
>
> Hope it helps.
> jack
>  -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Paul Hartland
> Sent: Thursday, December 03, 2009 2:42 AM
> To: Access List
> Subject: [AccessD] Read XML File Using xsd Schema File
>
> To all,
>
> We have been a given what looks to me like a fairly complex XML file, we
> have also been given a xsd schema file.  I tried using the SQLXMLBulkLoad
> object in VB6 and was getting the error
>
> Schema: relationship expected on 'Company'.
>
> The company that gave us both the files insist that the xsd is correct
> (according to my project manager).  I downloaded and installed Stylus
> Studio
> 2010, with which I loaded the XML, and then generated my own xsd schame
> file.  Tried again and this time get the same error as above, but instead
> of
> 'Company' the error was 'Groups'
>
> The VB6 code I am using is as follows:
>
> Dim objBL
>
> Set objBL = CreateObject("SQLXMLBulkLoad.SQLXMLBulkLoad")
> objBL.ConnectionString = "Provider=SQLOLEDB.1;Password=hermes;Persist
> Security Info=True;User ID=sa;Initial Catalog=XLTestCD;Data Source=AL-SQL1"
>
>
> objBL.KeepIdentity = True
>
> objBL.errorlogfile = "C:\XML_StylusStudio\Error.log"
>
> objBL.checkconstraints = True
> objBL.xmlfragment = True
> objBL.schemagen = True
> objBL.sgdroptables = True
>
> objBL.Execute "C:\XML_StylusStudio\newschema.xsd",
> "C:\XML_StylusStudio\CDFull_Original.xml"
> Set objBl=Nothing
>
> The object of the exercise being that we generate related tables in SQL
> Server 2005 of the XML data.
>
> Would be grateful if anyone could help with this (would be happy to send
> example XML file and the schema offline), as I haven't got much hair left
> to
> pull out.
>
> Thanks in advance for any help on this.
>
> --
> Paul Hartland
> paul.hartland at googlemail.com
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.709 / Virus Database: 270.14.88/2538 - Release Date: 12/03/09
> 02:32:00
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>



-- 
Paul Hartland
paul.hartland at googlemail.com



More information about the AccessD mailing list