dbTalk Databases Forums  

Writing header records to the destination.

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


Discuss Writing header records to the destination. in the microsoft.public.sqlserver.dts forum.



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

Default Writing header records to the destination. - 10-10-2003 , 01:55 PM






I'm using DTS to copy files from SQLServer to a txt file. I would like to
add a header row and trailer row to the txt file. I've read that the
function "PreSourceMain()" is the place to do this. I'm using VB.net to run
the DTS script
Let's say that I just wanted to put a datetime stamp and a file name as the
header record, how would I do this?



Reply With Quote
  #2  
Old   
John Bell
 
Posts: n/a

Default Re: Writing header records to the destination. - 10-11-2003 , 12:45 PM






Hi

The easiest way may be to use an activeX scripts task and the
FileSystemObject.

http://www.sqldts.com/default.aspx?292
http://msdn.microsoft.com/library/de...gwithfiles.asp
in a similar way to: http://www.sqldts.com/default.aspx?256

John

"Eddie Suey" <esuey (AT) inBizServices (DOT) com> wrote

Quote:
I'm using DTS to copy files from SQLServer to a txt file. I would like to
add a header row and trailer row to the txt file. I've read that the
function "PreSourceMain()" is the place to do this. I'm using VB.net to
run
the DTS script
Let's say that I just wanted to put a datetime stamp and a file name as
the
header record, how would I do this?





Reply With Quote
  #3  
Old   
esuey
 
Posts: n/a

Default Re: Writing header records to the destination. - 10-20-2003 , 04:46 PM





I don't have access to the Axscphst DLL. I need this to run the scripts
- don't I?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
  #4  
Old   
Darren Green
 
Posts: n/a

Default Re: Writing header records to the destination. - 10-28-2003 , 12:00 PM



In article <#npROO1lDHA.3688 (AT) TK2MSFTNGP11 (DOT) phx.gbl>, esuey
<esuey (AT) hotmail (DOT) com> writes
Quote:

I don't have access to the Axscphst DLL. I need this to run the scripts
- don't I?

If you haven't got Axscphst.dll installed and registered then you will
get some nice big errors when trying to use an ActiveX Script in your
package, e.g.

ActiveX Scripting Initialization Error
(http://www.sqldts.com/default.aspx?224)
--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



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.