Import to sage 50 Exception

Hi,

I am using sage 50 U.S Edition 2013 and visual studio 2013. I am using Interop.PeachwServer dll  with c# console application.

When i import csv file using dotnet c# into sage 50 accounting software 2013 version ,some records data is invalid so it will skip from import functionality.So How can avoid that? I need to go next valid record and then import from that valid record to sage 50.

How to move next record in the import CSV file, how to identify which record failed?

  • Instead of writing all your records to the csv fie at once, put the records in a list, Step through the list and for each record recreate the csv file and clear\recreate an importer. Put your try catch inside a for next loop and once it catches the exception it should go to the next record.  The downside to this is if you’re importing a lot of records it has to write then read the csv file each time.