Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 3rd, 2007, 06:07 PM
Registered User
 
Join Date: Apr 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default XML Schema Issue

I am trying to import XML data into a SQL Server 2005 table using SSIS. The schema I was given does not seem to work at all. However if I generate a schema in the xml source editor it seems to work although I am having problems with it. When the schema is generated it is assigning fields where there is only numeric data the type unsignedInt. The original schema actually used string for this field. The problem is that I cannot import the unsignedInt data type into a SQL table because it seems that no data type is compatible with unsignedInt. If I change the data type in the schema file to string the changes don't seem to appear in SSIS. For example in the data flow path the data type in the metadata still says DT_UI4. Does anyone have any experience with this?
 
Old April 4th, 2007, 01:45 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Well there's not a 100% correlation between data types in most schemas, SQL Server and XML Schema are no exception. You can use BIGINT as the datatype in the SQL table and use a constraint to set the value to be between 0 and 4294967295.

--

Joe (Microsoft MVP - XML)
 
Old April 4th, 2007, 11:26 AM
Registered User
 
Join Date: Apr 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I tried that but I still get an error message saying "FieldName" can't be inserted because the conversion between types DT_UI8 abd DT_I8 is not supported.

 
Old April 5th, 2007, 02:13 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Okay, in that case you will have to investigate if you can override the conversion in some way. Alternatively modify the schema so that it uses a signed value that can be converted.

--

Joe (Microsoft MVP - XML)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in XML Schema example?? witch_hazel BOOK: Beginning XML, 4th Ed ISBN: 978-0-470-11487-2 3 November 1st, 2007 02:14 PM
XML schema for SQL swan XML 4 July 27th, 2006 05:07 AM
What's the use of XML Schema?! janise XML 2 August 29th, 2004 05:31 AM
xml schema help allang XML 0 August 19th, 2004 09:58 PM
XML, XML Schema, JavaScript, ASP cyberjames2003 XML 0 June 4th, 2003 04:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.