Click here to Skip to main content
15,903,388 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm using C++/CLI and MQ. I receive an XML formmated character array. I've managed to get the XML deserialized into a generic list of custom (sub) objects, and now I need to do a two-way match against data in a local SQL Table.

Is there a way to pass the list directly as a TVP? Can I implement an interface that will allow ADO to accept this list as a TVP for a stored procedure? Or do I need to loop through each list item and manually copy it into a DataTable? Or perhaps a DataTable can be used in place of a List<customobject>?

I've been searching for a while, and haven't found any examples. If someone could point me in the right direction, that'd be great; otherwise, I'll plan on copying the list into a datatable. It just seems crazy to have to copy it to a list only to copy it to a data table and then delete the whole thing. That's an awful lot of copying.

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