Hi, Am I right in saying that by default, an element of complex type
in an XSD annotated schema maps to the table with the same name in the
specified database. If so does anyone have any idea why my app runs
with no errors, but doesn't add anything to the table in the DB. I was
hoping to find the value 'GDS-2392265' in the table.
Any Ideas?
Thanks in advance.
Rich
vb.net code
-----------------
Dim objBL
objBL = CreateObject("S QLXMLBulkLoad.S QLXMLBulkLoad")
objBL.Connectio nString = "provider=SQLOL EDB.1;data source=xxx
\SQLEXPRESS;dat abase=xxx;uid=s a;pwd=xxxxx"
objBL.ErrorLogF ile = "c:\error.l og"
objBL.KeepIdent ity = False
objBL.Execute(" c:\SCHEMA.XML", "c:\INPUT.X ML")
objBL = Nothing
Me.Enabled = True
DB Table Def
-------------------
CREATE TABLE [dbo].[FeatureCollecti on](
[fid] [nchar](20) COLLATE SQL_Latin1_Gene ral_CP1_CI_AS NULL
) ON [PRIMARY]
Schema File
------------------
<?xml version="1.0" ?>
<xsd:schema xmlns="urn:sche mas-microsoft-com:xml-data"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:sql="urn: schemas-microsoft-com:mapping-schema"
xmlns:osgb="htt p://www.ordnancesur vey.co.uk/xml/namespaces/osgb"
xmlns:gml="http ://www.opengis.net/gml"
xmlns:xlink="ht tp://www.w3.org/1999/xlink"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance">
<xsd:element name="FeatureCo llection">
<xsd:complexTyp e>
<xsd:attribut e name="fid" type="xsd:strin g"/>
</xsd:complexType >
</xsd:element>
</xsd:schema>
XML File
------------
<?xml version='1.0' encoding='UTF-8'?>
<osgb:FeatureCo llection
xmlns:osgb='htt p://www.ordnancesur vey.co.uk/xml/namespaces/osgb'
xmlns:gml='http ://www.opengis.net/gml'
xmlns:xlink='ht tp://www.w3.org/1999/xlink'
xmlns:xsi='http ://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocat ion='http://www.ordnancesur vey.co.uk/xml/namespaces/
osgb http://www.ordnancesur vey.co.uk/xml/schema/v5/OSDNFFeatures.x sd'
fid='GDS-2392265'>
</osgb:FeatureCol lection>
in an XSD annotated schema maps to the table with the same name in the
specified database. If so does anyone have any idea why my app runs
with no errors, but doesn't add anything to the table in the DB. I was
hoping to find the value 'GDS-2392265' in the table.
Any Ideas?
Thanks in advance.
Rich
vb.net code
-----------------
Dim objBL
objBL = CreateObject("S QLXMLBulkLoad.S QLXMLBulkLoad")
objBL.Connectio nString = "provider=SQLOL EDB.1;data source=xxx
\SQLEXPRESS;dat abase=xxx;uid=s a;pwd=xxxxx"
objBL.ErrorLogF ile = "c:\error.l og"
objBL.KeepIdent ity = False
objBL.Execute(" c:\SCHEMA.XML", "c:\INPUT.X ML")
objBL = Nothing
Me.Enabled = True
DB Table Def
-------------------
CREATE TABLE [dbo].[FeatureCollecti on](
[fid] [nchar](20) COLLATE SQL_Latin1_Gene ral_CP1_CI_AS NULL
) ON [PRIMARY]
Schema File
------------------
<?xml version="1.0" ?>
<xsd:schema xmlns="urn:sche mas-microsoft-com:xml-data"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:sql="urn: schemas-microsoft-com:mapping-schema"
xmlns:osgb="htt p://www.ordnancesur vey.co.uk/xml/namespaces/osgb"
xmlns:gml="http ://www.opengis.net/gml"
xmlns:xlink="ht tp://www.w3.org/1999/xlink"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance">
<xsd:element name="FeatureCo llection">
<xsd:complexTyp e>
<xsd:attribut e name="fid" type="xsd:strin g"/>
</xsd:complexType >
</xsd:element>
</xsd:schema>
XML File
------------
<?xml version='1.0' encoding='UTF-8'?>
<osgb:FeatureCo llection
xmlns:osgb='htt p://www.ordnancesur vey.co.uk/xml/namespaces/osgb'
xmlns:gml='http ://www.opengis.net/gml'
xmlns:xlink='ht tp://www.w3.org/1999/xlink'
xmlns:xsi='http ://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocat ion='http://www.ordnancesur vey.co.uk/xml/namespaces/
osgb http://www.ordnancesur vey.co.uk/xml/schema/v5/OSDNFFeatures.x sd'
fid='GDS-2392265'>
</osgb:FeatureCol lection>
Comment