Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSIS - OLE DB Source task Error Expand / Collapse
Author
Message
Posted Thursday, September 27, 2012 12:20 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Sunday, September 7, 2014 10:22 PM
Points: 1,126, Visits: 1,387
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?


Thanks
Post #1365045
Posted Thursday, October 4, 2012 5:08 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, September 2, 2014 1:31 AM
Points: 8, Visits: 95
Hardy,

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.

Maharaj

Post #1368302
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse