SSIS - OLE DB Source task Error

  • Hardy21

    SSCrazy Eights

    Points: 9708

    I am using SSIS package to read the data from Access file and import them to SQL Server table. I have total 10 tables that I need to migrate / import to SQL Server. I am using OLE DB Source & OLE DB Destination tasks for this requirement. SSIS Package is working fine and perform the required tasks.

    I am using OLE DB Source task to read the data by providing following:

    OLE DB Connection Manager: AccessDB Connection

    Data access mode: Table or View

    Name of the table or the view: tableName

    Now, I need to add one more table but it may not present in all the accessdb (mdb) files. Because of table is not present, OLE DB source task throws an error but I would like to ignore that error, insert default data to SQL Server table and go ahead with other tasks.

    How can I achieve this functionality in SSIS package?




    Points: 8


    Check the table is exist in database before you do the load process. If the table is not exist update a user variable ( create a variable , datatype: bool, default to False) to true. Check this variable in precedence constraint by changing to "Expression" condition.

    If you work out the above scenario in For Each loop container passing through all table names, you can load it one by one by evaluating the above condition.



Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply