dbTalk Databases Forums  

Text File (Source) Connection

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


Discuss Text File (Source) Connection in the microsoft.public.sqlserver.dts forum.



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

Default Text File (Source) Connection - 03-17-2005 , 06:31 AM






Thanks to help from here i can use the folliing axtive x code to dynamicly
set the source filename

Dim Oconn
Set oPkg = DTSGlobalVariables.Parent
Set Oconn = DTSGlobalVariables.Parent.Connections("Text File (Source)
Copy")
OConn.DataSource = DTSGlobalVariables("gv_FileFullName").Value

' I have tried adding this but it doesnt seem to work .. any idea's
OConn.Skip Rows = 10

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

Default Re: Text File (Source) Connection - 03-17-2005 , 07:10 AM






You can see what properties a DTS Connection has in Books Online, and Skip
Rows is not one, as this is on the underlying connection provider. Fully
implemented properties cannot have spaces in their names either.

Connection object
"mk:@MSITStore:C:\Program%20Files\Microsoft%20SQL% 20Server\80\Tools\Books\dt
sprog.chm::/dtspothobj_6eyc.htm"

Try this-

Dim oConn
Set oConn = DTSGlobalVariables.Parent.Connections("Text File (Source)")
oConn.ConnectionProperties("Skip Rows").Value = 9


--
Darren Green
http://www.sqldts.com
http://www.sqlis.com


"Peter Newman" <PeterNewman (AT) discussions (DOT) microsoft.com> wrote

Quote:
Thanks to help from here i can use the folliing axtive x code to dynamicly
set the source filename

Dim Oconn
Set oPkg = DTSGlobalVariables.Parent
Set Oconn = DTSGlobalVariables.Parent.Connections("Text File (Source)
Copy")
OConn.DataSource = DTSGlobalVariables("gv_FileFullName").Value

' I have tried adding this but it doesnt seem to work .. any idea's
OConn.Skip Rows = 10



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.