Click here to Skip to main content
15,891,657 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

I am storing data from xml to database using sqlbulk copy, but i getting datatype mismatch error,
Give me suggestion to get rid of this error.
Thank in advance


Regards,
Gaurav
Posted
Comments
ZurdoDev 2-Sep-14 12:16pm    
You'll have to track down the error.
Suvabrata Roy 2-Sep-14 12:34pm    
Check field wise data and its type with table attributes
George Jonsson 2-Sep-14 21:25pm    
If possible send a smaller amount of data with only one record (assuming that the 100 MB is repeated data), that you have checked manually so it is correct.
If the problem is gone, you know that the XML data is corrupt somewhere.
If the problem persist, then I guess you have to check your XML structure and its datatypes with the database columns that are updated.

1 solution

BY default all the data get from the xml is of string (or varchar) datatype, while saving in database type cast the data in appropriate data type.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900