![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a DTS Package that has 2 tasks and 1 connection. Tasks 1. ActiveX module that reads connection properties from a text file and iterates thru them changing the connection properties of the Package connection. 2. ExecuteSQL task that has my script and uses the connection. Here is my problem. ActiveX iterates thru the text file. After it changes the connection property I want it to run the Execute SQL task. snip |
#3
| |||
| |||
|
|
I have a DTS Package that has 2 tasks and 1 connection. Tasks 1. ActiveX module that reads connection properties from a text file and iterates thru them changing the connection properties of the Package connection. 2. ExecuteSQL task that has my script and uses the connection. Here is my problem. ActiveX iterates thru the text file. After it changes the connection property I want it to run the Execute SQL task. While Not (nIn.AtEndOfStream) strLine = nIn.ReadLine msgbox left(strLine,instr(strLine,",")-1) 'test msgbox for server name msgbox right(strLine,len(strLine)-instr(strLine,",")) 'test msgbox for database name strLineServer = left(strLine,instr(strLine,",")-1) 'assign the server name strLineDB = right(strLine,len(strLine)-instr(strLine,",")) 'assign the database name AddGlobalVariables = True 'do not delete this statement Set oPackage = DTSGlobalVariables.Parent Set oConnection = oPackage.Connections(1) '1 being the database connection oConnection.Datasource = strLineServer oConnection.Catalog = strLineDB oConnection.Userid = "xxxxxxxx" oConnection.password = "xxxxxxxx" oPackage.tasks(2).execute 'Here is the problem. I want it to run this for each connection change. Wend Any Suggestions? Thanks Ron Sissons, DBA Information Technology Services Riverside County Office of Education 3939 Thirteenth Street, Riverside, CA 92502-0868 Telephone: (909) 826-6471; FAX: [909] 826-6451 |
![]() |
| Thread Tools | |
| Display Modes | |
| |