Date: 05/11/05 (SQL Server) Keywords: database, sql ...on the same VBScript thing I'm trying to come up with in DTS. I'm sure this is another "it's very obvious, you just haven't put the piece together correctly" kind of question. dim MyDestConnREF set MyDestConnREF = CreateObject("ADODB.Connection") MyDestConnREF.Open = "Provider=SQLOLEDB.1;Data Source=TESLA;Initial Catalog=EDI;userid=sa'password=nothing" dim MyDestConnISA set MyDestConnISA = CreateObject("ADODB.Connection") MyDestConnISA.Open = "Provider=SQLOLEDB.1;Data Source=TESLA;Initial Catalog=EDI;userid=sa'password=nothing" [snip a bunch of stuff] select case ucase(trim(left(dtssource("Col001"),3))) case "REF" redim sArray(4) DTSDestination("recordnum") = recordnum DTSDestination("subrecordnum") = subrecordnum DTSDestination("type") = sArray(0) DTSDestination("refnumqual") = sArray(1) DTSDestimation("refnum") = sArray(2) DTSDestination("description") = sArray(3) DTSDestimation("refid") = sArray(4) case "ISA" redim sArray(16) [snip a bunch of stuff] How to I tell it that the columns in DTSDestination in this excerpt pertain to the REF table, as opposed to ISA (or any other table in the database)? I can't seem to find a parameter in Connection.Open that will let me specify a table, and since I'm working with multiple tables, I'm not going to have a default destination-- I'm going to have multiple destinations in the same script. Thanks. Source: http://www.livejournal.com/community/sqlserver/26495.html
|