I am creating a facility whereby you can select a source file (.csv), and a target (SQL table).
Then I call a DTS to copy the csv file to the SQL table.
How can I validate that the two files have the same number of columns ?
Moved to SQL Server Tools forum|||In order to check the number of rows you need to work on DTS with workflow, refer to books online for more information and you can schedule the DTS package a SQLagent job by right-click on selected package.|||I need to validate that the correct file has been selected before scheduling the DTS package. This is why I need to do it in my VB.Net Windows application.|||You can write a custom Script Task inside the SSIS package that will open the file and check how many columns it has. You can utilize Excel object model for that or just go with regular .NET IO libraries.
Hope that helps.
Maciek Sarnowicz
No comments:
Post a Comment