|
sql
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Capture Error In DTS PackageI have a SQL Server Package that is dumping a text file into an Access
Database. However, due to update timing every now and then it errors out due to a primary key violation. How do I capture that error number in my next Active Script Task and determine whether or not I want to continue (since if it's a duplicate I just want to skip it and finish the DTS package). If it's a different error I want to log it. Thanks! Hi
If these are identity values you may want to check out http://www.sqldts.com/293.aspx if not try http://www.sqldts.com/282.aspx John Show quote "Creative" wrote: > I have a SQL Server Package that is dumping a text file into an Access > Database. However, due to update timing every now and then it errors > out due to a primary key violation. How do I capture that error > number in my next Active Script Task and determine whether or not I > want to continue (since if it's a duplicate I just want to skip it and > finish the DTS package). If it's a different error I want to log > it. > > Thanks! > On Nov 27, 3:00 am, John Bell <jbellnewspo***@hotmail.com> wrote:
Show quote > Hi Thanks for the reply but it doesn't look like that answers my> > If these are identity values you may want to check outhttp://www.sqldts.com/293.aspx > if not tryhttp://www.sqldts.com/282.aspx > > John > > > > "Creative" wrote: > > I have a SQL Server Package that is dumping a text file into an Access > > Database. However, due to update timing every now and then it errors > > out due to a primary key violation. How do I capture that error > > number in my next Active Script Task and determine whether or not I > > want to continue (since if it's a duplicate I just want to skip it and > > finish the DTS package). If it's a different error I want to log > > it. > > > Thanks!- Hide quoted text - > > - Show quoted text - question. I'm actually using a File Transformation from a text file to an access database. I have a connection to the text file and a connection to an access database with a transformation connecting the two. Hi
There was no mention of the destination database being an access database, in your original post. I suggest that you therefore load into a staging table and either do an update if the PK exists or an insert if it doesn't. John Show quote "Creative" wrote: > On Nov 27, 3:00 am, John Bell <jbellnewspo***@hotmail.com> wrote: > > Hi > > > > If these are identity values you may want to check outhttp://www.sqldts.com/293.aspx > > if not tryhttp://www.sqldts.com/282.aspx > > > > John > > > > > > > > "Creative" wrote: > > > I have a SQL Server Package that is dumping a text file into an Access > > > Database. However, due to update timing every now and then it errors > > > out due to a primary key violation. How do I capture that error > > > number in my next Active Script Task and determine whether or not I > > > want to continue (since if it's a duplicate I just want to skip it and > > > finish the DTS package). If it's a different error I want to log > > > it. > > > > > Thanks!- Hide quoted text - > > > > - Show quoted text - > > Thanks for the reply but it doesn't look like that answers my > question. I'm actually using a File Transformation from a text file > to an access database. I have a connection to the text file and a > connection to an access database with a transformation connecting the > two. > |
|||||||||||||||||||||||