dbTalk Databases Forums  

DTS & Trigger

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss DTS & Trigger in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Eric
 
Posts: n/a

Default DTS & Trigger - 02-27-2006 , 08:11 AM






Our web app enables users to upload a txt file that includes records for
financial transactions (one record = one transaction). All the parsing of
the txt file and db writes was done w/ASP and stored procedures. Problem is,
if a file contains more than a few thousand records it's a slow.

So...I decided to instead call a DTS package from an sp. The DTS reads the
contents of the txt file and dumps the records into a table (File_Upload).
Upon completion of the DTS, the user would then receive confirmation that the
file had been uploaded. As far as the user is concerned, I want to indicate
that processing is complete.

Now additional processing needs to be performed at this point, so I decided
I would place a trigger on File_Upload (which then calls another stored
proc), thinking this would be a seperate process. This is not the case,
because if I force an error on the trigger, the Package Log for DTS logs an
error. I don't want this processing to be included in the same
transaction/process as the DTS package itself as this defeats the purpose of
providing a quicker user experience. Here's an outline of how I've
progressed thus far:

1) ASP page calls 'sp_DTS_File' (stored proc.)
2) sp_DTS_File then executes DTS using sp_OACreate.
Contents of txt file dumped into File_Upload (table).
4) Insert trigger on File_Upload table calls sp_Process_File which populates
data into normailized tables. This is the step that I want to be
'transparent' to the user. This is not the case though.

Any help is greatly appreciated.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.