I am not able to access SSIS variables which are defined at Data Flow Task in a custom component. This custom component is developed by me in C#. How can i access these variables?
Please let me know if theres a way to access SSIS variables.
I am trying to access a single variable in a script and a deadlock error continues to come up. I have a single string variable that is added to the readwritevariables collection in the editor. I am trying to execute the following code:
Dim variables As Variables
Try
Dts.VariableDispenser.LockForWrite("Test")
Dts.VariableDispenser.GetVariables(variables)
Catch ex As Exception
Throw ex
Finally
variables.Unlock()
End Try
I have installed Service Pack2 and this error continues. I know it has been posted on before and I appreciate any help.
...I guess that simply means that I can't access a package's variables within a custom log provider? Can anyone comment/confirm? Any other options/routes to achieving the same..?
I have following query in stored procedure Select ContractId, Version, CreateDate, body, IsCurrentFrom CRM_Contracts where ContractId=@ContractId I am trying to access the value of IsCurrent field in Code behind using sqlDataSource to hide a radiobutton list in Formview control's when it is in Edit Mode. How can i do this.
Does anyone have code to access data? I want to create a sqldatasource control on the page, but would like to programmatically/manually/code-behind-wise to fill in my queries and their parameters. Thanks!
I have the following datasource... <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ***%>" ProviderName="<%$ ***%>" SelectCommand='SELECT "var1", "var2", "var3" FROM "tbl1"'> </asp:SqlDataSource> Would it be possible to use VB code to read the reasults from this datasource? (There are conditions that restrict me from running the query itself through VB code.) As always, any help is greatly appreciated. Thanks!
I am trying to retrieve and manipulate the value of the stored procedure parameters in the following custom code:
Code Snippet Public Function ShowLoading(ByVal intOption as integer, byVal BasicLoading as string, byVal BasicHealthExtra as string, byVal RiderLoading as string, byVal RiderHealthExtra as string, byVal TotalAmount as string) As string
dim strRider as String dim strCompanyName as string strCompanyName = Fields!CompanyName.Value
select case strCompanyName case "and Plus Rider ": strRider = "Plus Rider" case "and Assist Rider ": strRider = "Assist Rider" end select return strRider
End Function
However, i got this error when I try to preview the report: An error occurred during local report processing, The definition of the report :
'/reportC' is invalid. There is an error on line 5 of custom code: [BC30469] Reference to a non-shared member requires an object reference.
Any help is greatly appreciated. Thanks in advance.
My report has multiple datasets, and I want to access the fields of a particular dataset from custom code. The problem is that the name of the dataset to use is only calculated during the execution of the custom code.
Allow me to illustrate:
public function Test(data as DataSets, fieldName as string)dim datasetName as string = CalculateDatasetName()dim ds as Dataset = data(datasetName)' now here I want to get the fieldName out of the dataset.' in the report, I would do something like ' First(Fields!fieldName.Value, datasetName)' but in custom code, this obviously doesn't work.end function
I've been looking for a way to accomplish this, but it seems you cannot get data from a dataset through custom code (there is only the commandtext property). Also it is not possible to pass the Fields collection as a parameter, as I do not know the dataset name when in the report designer.
I hope my problem description is clear. Does anyone know how to solve this issue?
I am trying to access HttpContext.Current in my report code section (report properties) since I have to look at a cookie. However, HttpContext.Current is always null. Has anyone managed to access HttpContex.Current from a report?
In my report, I have a table with a nested group. The inner most group contains a column with values that are dynamically calculated in the report. I would like the outer group to display the sum of the inner group values. However, the outer group does not have access to the inner group scope.
As a solution, I am attempting to use the method detailed at this site:
Essentially, the method is to declare a hash table in the embedded code where data can be stored. I slightly modified the code to the following:
Code Block Public Dim hashTable as new System.Collections.HashTable
function setValue(key As Object, value As Object) As Object If (Not hashTable.ContainsKey(key)) Then hashTable.Add(key, value) Return value end Function
function getValue(key As Object) As Object If (hashTable.ContainsKey(key)) Then Return hashTable(key) Else Return Nothing end Function
function sumRunningValue(key As Object, value As Object) As Object If (Not hashTable.ContainsKey(key)) Then hashTable.Add(key, value) Else hashTable(key) = hashTable(key) + value Return hashTable(key) end Function
Inside the inner scope everything works great and I can even get the runnning value. But the reason I did this was to be able to access the value in the outer group. But, it doesn't work! When I call Code.getValue(key) I get Nothing back.
So, it seems this is a scope issue. Is anyone aware of a work around for this problem. Is it possible to declare the hashtable with a global scope, for instance? Is the code redeclared for every new group?
Is there any way I can use a variable from my code behind file in the UpdateCommand of a sqlDataSource? I have tried <%$ strUserGuid %>and<% strUserGuid %> any help appreciated.Thanks Dave
Hello,Does anybody know what is the documented and known behavior ofinserting/updating binary columns using host variables from a client to aserver which have different code pages? Will any code page / character setconversion take place? I am particulary interested in insert/update fromsubqueries.eg:insert into t1(binarycol) select :HV1 from t2versusinsert into t1(binarycol) select :HV1||charcol from t2update t1 set bytecol=:HV1versusupdate t1 set bytecol=:HV1||'abc'insert into t1 (bytecol) values(:HV1)versusinsert into t1 (bytecol) values(:HV1||'abc')Is the conversion dependent on the context?ThanksAakash
I'd like to use Globals!ReportName and User!Language in custom code like this:
Function Localize(ByVal key As String) As String Return ReportUtil.Localizer.Localize(Globals!ReportName, key, User!Language) End Function
If I preview the report I get an error message saying that there is error on line 2 of custom code. Is it possible to reach report variables in custom code?
my name is Christof and I#m currently trying to write into our Terdata Warehouse by SSIS. In the Management Studio we can perfectly access Terdata - reading from it - but we actually see no way writing back Data into that system. Is there any hidden feature, any configuration menu that we hadīnt seen so far?.
In the software documentation we found a tip "ADO.NET" as Data Destination isīnt imlemented for now - please wait until ....
Iīm asking me if someone has had the same problem before and could help me out with a little tip.
my name is Christof and I#m currently trying to write into our Terdata Warehouse by SSIS. In the Management Studio we can perfectly access Terdata - reading from it - but we actually see no way writing back Data into that system. Is there any hidden feature, any configuration menu that we hadīnt seen so far?.
In the software documentation we found a tip "ADO.NET" as Data Destination isīnt imlemented for now - please wait until ....
Iīm asking me if someone has had the same problem before and could help me out with a little tip.
After reading some threads on this forum about accessing OLAP data from SSIS via an OLE DB Source component (and trying it myself and getting that "pcrsstore.cpp line 325" error), I have worked around the problem by using a Script Task component.
This calls a .NET assembly I wrote that uses ADOMD.NET to get at the data using an MDX query, and then actually posts an event to a Notification Services instance via a stored proc.
Writing, deploying, and maintaining a .NET assembly is more than I wanted to do, but it was worth the effort since now I know a little about extending SSIS when I need to.
But what I really wanted to do was the following, all from within the core components of SSIS:
Import my OLTP data into my relational warehouse (already done using SSIS) Process the cube (already done using SSIS) Access the cube via MDX and post an event to Notification Services It's this last step that needed some special work because of SSIS's apparent limitation accessing cube data (although posting the event to NS would be easy because SSIS can call a stored proc on the NS application database). So I'm hoping that a future release or service pack of SSIS will give us some components to run MDX and get the OLAP data into the pipeline as if it were from any other source. Thanks for reading, and if anyone has any suggestions on a better way to achieve what I need please let me know! -Larry
I'm finding that the standard components often just don't quite meet my needs, but would only need some fairly minor changes to save me and my team a lot of work (and produce more elegant solutions). So I was just wondering whether the source code was available for the standard components that come with SSIS, or if there is anyway to extend their functionality? Or do you just have to start form scratch?
I want to create a local temporary table in execute sql task and and want to use the same in Data flow task as source table.
I follow the following steps to achieve this:
01. Created a new SSIS package 02. Create a connection string to "(local)/." server, "tempdb" database 03. Set the "RetainSameConnection" property value to "TRUE" 04. Set the "DelayValidation" to "TRUE", where ever I found this property 04. In Control Flow I added to items a. Execute SQL Task b. Data Flow Task 05. For "Execute SQL task" I set the connection to "tempdb" 06. I written the following query Create table #transfer_CompaniesToProcess_tbl ( companyID int not null ) GO 07. In Data Flow task I added "OLE DB Source" and "OLE DB Destination" 08. In "OLE DB Source" I changed the "Data access mode:" to "SQL command" 09. In "SQL command text:" I entered "select * from #transfer_CompaniesToProcess_tbl" 10. When I clicked on the "OK" button; I ended with following error:
TITLE: Microsoft Visual Studio ------------------------------ Error at Data Flow Task [OLE DB Source [1]]: 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 '#transfer_CompaniesToProcess_tbl'.".
------------------------------ ADDITIONAL INFORMATION: Exception from HRESULT: 0xC0202009 (Microsoft.SqlServer.DTSPipelineWrap) ------------------------------ BUTTONS: OK ------------------------------
I gone through the following article and it seems I missed some thing. http://blogs.conchango.com/jamiethomson/archive/2006/11/19/SSIS_3A00_-Using-temporary-tables.aspx
1) Create a global variable. 2) assign a value to the variable using an SQL Task. (For this all I want to do is assign a maximum value from a column in my table)
3) use the variable in a Data flow task (using SQL to get my source data)
I know this must be very simple but I am new to SSIS and I am struggling to achieve this task.
I'm trying to use a variable in a OLEDB Command, but i can't do it. What i want to do is: Step 1: Count the number of rows of a table (using count rows transofrmation) and save it to a variable 'var1'. Step2: Insert some rows on this table. Step 3: Count again the number of rows and save it on another variable 'var2'. Step 4: Ina OLEDB Command , get the inserted records in step 2 to manipulate them on other tables...
Something like that: select top (@var2 - @var1) * from table order by desc
ŋCan i use local or global variables from an OLEDB Command transformation object?
Hi I am trying to schedule a job to copy an MDB data file from Unix server to Windows 2003 server (Accfp1_data2_server). I have created a file copy SSIS package and tested it in the SSIS Visual Studio environment where it runs ok. The package was created while logged in as a domain administrator.
I then created a job to run this package (which is stored on a folder) using the credential of the same domain administrator who has full access privilege to both of these servers. However, the job fails whenever it is run manually or scheduled? The error message displayed is given below --------------------------------------------------------------- Message Executed as user: FORTIESABCITYG. Microsoft (R) SQL Server Execute Package Utility Version 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 14:26:07 Error: 2007-09-13 14:26:12.56 Code: 0xC001401E Source: CommunityContact - Copy MS Access Database Connection manager "CONTACT.mdb On Accfp1_data2_server" Description: The file name "\Accfp1_data2_serverDATA2Arts&recAppsContactsCONTACT.mdb" specified in the connection was not valid. End Error Error: 2007-09-13 14:26:12.56 Code: 0xC001401D Source: CommunityContact - Copy MS Access Database Description: Connection "CONTACT.mdb On Accfp1_data2_server" failed validation. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 14:26:07 Finished: 14:26:12 Elapsed: 5.297 seconds. The package execution failed. The step failed. ---------------------------------------------------------------
Please note that the job runs without problem when I change the source file to a Windows 2000 server share . How bizzare? Hope this is not a Microsoft's Trick?
I have a process which connects to a SQL server remotely, runs some code, creates a temporary table with an output. I want to be able to select the results of this table into XML (not a problem), put the results into a variable in SSIS, and put the variable results into a SQL table a different SQL Instance. Doing it this way removes the footprint of needing a normal table on the source SQL Server.
Before in DTS, I used to using ActiveX scripts to setup simple Global Variables that would later be used by the package, let's say a give state or a date. I'm completely lost how to do the same in SSIS, can someone give me a hand? I'm not sure what component to use and how to read this variable.
Hello, I am wondering what is the difference between assigning variables in the following two ways.1. Dim myVar11 As Variables Dts.VariableDispenser.LockOneForWrite("LoopCount", myVar11) myVar11("LoopCount").Value = 32. Dts.Variables("LoopCount").Value = 3I received this error when processing SSIS Package.
Error: A deadlock was detected while trying to lock variables "User::LoopCount" for read/write access. A lock cannot be acquired after 16 attempts. The locks timed out.
I have a SSIS package that was migrated from DTS 2000. It had a variable that I passed to the DTS package when executing. Now when I try executing the SSIS package with the variable, I get the following error: The package path referenced an object that cannot be found: "package.variables[user::SnapShotDate].value". This occurs when an attempt is made to resolve a package path to an object that cannot be found.
From everything that I can find, I am passing the variable correctly. If I look at the package within BIDS, my variable is listed under the variable window & it is scoped for the package. Any ideas on what I might be missing here? This is my first SSIS package that contains a variable.
I have a simple task that I would like to manage through a SSIS package but do not know how to accomplish it. I need to perform the following tasks:
1. update a sql server table (ecwcust) and set the ftpstatus column to 'P' when the column's value is 'E'. update ecwcust set ftpstatus = 'P' where ftpstatus = 'E' 2. declare a variable and set the variable to the number of rows that have a ftpstatus equal to 'P' declare @newcustomercount int select @newcustomercount = count(*) from ecwcust where ftpstatus = 'P' 3. if @newcustomercount > 0, copy all of the rows from ecwcust where ftpstatus = 'P' to an excel spreadsheet. 4. send an email to an email recipient with the excel spreadsheet as an attachment. 5. delete the excel spreadsheet.
I do not know how to create the variable @newcustomercount so that I can determine whether or not to create the excel spreadsheet and copy the records to it. I have read all the online help and stuff that MS has but I can't understand the instructions. Please point me to some instructions that are understandable.
I have a script which grabs data from a source server. The problem is I have over 50 source servers, so I have to make a script for each one.. EXACTLY the same code but different linked server address.
So I was wondering if i can put the server name into a variable so I only need to make one script. Is that possible?