Showing posts with label pckg. Show all posts
Showing posts with label pckg. Show all posts

Friday, March 23, 2012

Pckg variable not getting set

I have created a simple package to zip a file. I am determining the file to be zipped dynamically at runtime using the Script task. I have a package variable defined as ReadWrite in the script task; I am attempting to store the dynamically determined file name to this package variable.

The code I am using to assign the value to the variable is:

Dim LatestBackupName As String

Dim ZipName As String

Dts.Variables("FileName").Value = ZipName & " " & LatestBackupName

I have set a breakpoint in the code to step into each statement. I am able to see that the "FileName" variable is being assigned the appropriate value. However, once the Script task completes, the value assigned to FileName is not stored in the variable. It is as if it gets the value during the script task and then loses it upon completion.

Am I going about setting the variable value wrong?

Any guidance is appreciated.

Nevermind. An answer to an unrelated post helped me figure this out. The variable was getting set - it just does not show it the way DTS would have. I set DelayValidation to TRUE to resolve the error I was receiving that I thought indicated the variable was not set.

pckg config.

Hi,

I have configure our ssis project that will take the connection string from the database

but when i change the connection string so the pckg will take the data from another server with exact tables name it fails.

what do you think the problem is ?

I think the problem is a mistake in the changed connection string or the preparation of the additional server. Perhaps if you gave us the full error message you get, we can make an informed guess?

Can you also be clear about which connection string has changed, one contained within the configuration store, or the connection that points to the SQL Server holding the configuration table?

|||

Hi,

this is the error i get

Message
Executed as user: FLYING-CARGO\dwhadmin. ...0.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 12:48:14 Error: 2007-07-10 12:48:16.00 Code: 0xC0202009 Source: Load AirPort_City_Codes airport_city_codes [31] Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E14. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E14 Description: "Statement(s) could not be prepared.". An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E14 Description: "Invalid object name 'export_db_drp.dbo.airport_city_codes'.". End Error Error: 2007-07-10 12:48:16.02 Code: 0xC004706B Source: Load AirPort_City_Codes DTS.Pipeline Description: "component "airport_city_codes" (31)" failed validation and returned validation status "VS_ISBROKEN". End Error Error: 2007-07-10 12:48:16.02 Code: 0xC00470... The package execution fa... The step failed.

what i've changed is the connection string of my erp db.

|||

what i've changed is the connection string of my erp db which store in my configuration table.

10x.

|||10x i've fix it.|||Could you post the resolution?|||

Hi steam5,

Description: "Invalid object name 'export_db_drp.dbo.airport_city_codes'." draws my attention. If you are executing a query, check if that runs successfully on the SSMS Query Editor after connecting to the ServerName you have changed. If succeeded, use the OLEDB source preview to look for top few rows.

Thanks

Subhash Subramanyam

sql