dbTalk Databases Forums  

vb dts application

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


Discuss vb dts application in the microsoft.public.sqlserver.dts forum.



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

Default vb dts application - 08-06-2003 , 01:53 PM






i'm 2 days late on having this working and still don't have an answer...

here is the call:
SetConnections(oPackage.Steps.Item, oConnection) <<it
wouldn't even compile unless I did something like this:
SetConnections(oPackage.Steps.Item(1), oConnection) <<but
that's not right either...because it calls my
oStep.GetExecutionErrorInfo function and gives me this
error:
Package failed error: hexnumbers...Step ordinal '1'(base
1) is out of range.

heres the code:
Private Sub SetConnections(ByRef oPackage As DTS.Package,
ByRef oConnection As DTS.Connection)
'Connection 1 to mink
With oConnection
oConnection.Catalog = "minkbackup"
oConnection.DataSource = "SERVER05"
oConnection.ID = 1
oConnection.UseTrustedConnection = True
End With
oPackage.Connections.Add(oConnection)
'UPGRADE_NOTE: Object oConnection may not be
destroyed until it is garbage collected. Click for
more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?
keyword="vbup1029"'
oConnection = Nothing

if you know of any other code that will do this:
i have these files needing to go into these tables in sql server 2000:

Program.txt = TBL_Client(a table)
BatchGroup.txt = TBL_Group(a table)
Catalog.txt = TBL_Catalog(a table)
Item.txt = TBL_MasterItem(a table)
ItemSold.txt = TBL_ItemsSold(a table)
Seller.txt = TBL_Seller(a table)

they will always have the same format...something like this:

"HSHS02","M100011","000289000","1106","3",""
"HSHS02","M100011","000289000","1140","3",""
"HSHS02","M100016","000289000","1143","1",""
"HSHS02","M100011","000289000","1509","3",""


..Net programmer
trintsmith (AT) hotmail (DOT) com

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: vb dts application - 08-06-2003 , 02:02 PM






Please do not post the same message under different subjects. See Darren's reply to your other post


--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support 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.