SSIS Expressions Object Model

Oct 23, 2006

Is it possible to use SSIS expressions object model?

If it is, what classes can be used?



Thanks in advance

View 1 Replies


ADVERTISEMENT

SSIS Connection Object And Expressions

Feb 23, 2006

I have been writing a custom source adapter that uses a file connection within the connection manager. If I hard-code a specific file then the component works. However if I use a file connection that has an expression defined which updates the connection, for example when you have a for-each loop looping over a set files. The file connection doesn€™t seem to re-evaluate expression each time you access the file connection via the code. Is there something that I am missing or is there a bug?

View 10 Replies View Related

Programmaing With SSIS Object Model

Jan 4, 2007

Hi there,

Can anyone point me to some sample source codes or any articles that describes how I can programmatically create a package which will import data from a flatfile (csv) to Sql server database.

I know there is some example that describes exporting data from sql server to flatfiles. Anyway I have failed to accomplish my goal by following those examples.

If anyone have a code snippet to do that please help me with that.

Thanks in advance

Moim Hossain

View 3 Replies View Related

Creating A Script Component Using SSIS Object Model

Jan 2, 2006

I had a SSIS Package which was developed on Beta Version Of SSIS, Now We have Standard Edition Of SSIS(Sql2k5) Installed.

In the Package we have One Flat file Source, One Script Component and A Sql Server as Target, We are programaticaly creating the package, Now When we open this Package in the Designer and Try to Run We get this error

"The script component is configured to pre-compile the script, but binary code is not found. Please visit the IDE in Script Component Editor by clicking Design Script button to cause binary code to be generated. "

Now when we just open the Script Designer and close it, The package runs.

I found the Error description at this link
http://msdn2.microsoft.com/en-us/library/microsoft.sqlserver.dts.runtime.hresults.dts_e_binarycodenotfound.aspx

but could not find any help on this.


Same thing use to work on Beta version now it is now working.
From my understanding the problem is that in beta version, the script use to run at runtime, Now what they have done is that they generate a compiled code out of script and run.

My problem is that since i am using C# code to generate the package, How Will I Create a Binary Code out of Script.

View 4 Replies View Related

Copying Multiple Tables From One Db To Another Using SSIS Object Model

Dec 25, 2007

Hi,

Can anyone tell how to copy multiple tables from from one db to another using SSIS object model.

I am confused with things like. Do I need to add multiple source and destination in a dataflow task or do I need to add multiple dataflow task?

What is the difference between these two? Is there any other (easy way) to achieve this?


Thanks.

View 7 Replies View Related

DTS Object Model Problem

Jun 21, 2001

Hi All,

Does any body have experience in capturing DTS step error information through VB Script.

When I run following code , the code in the IF loop is executed but I get 0 as the error number. Please note that stp_sql points to an Execute SQL task and the execute SQL task is failing and this script is executed on completion ( not success) of the Execute SQL task.

If stp_sql.ExecutionStatus = DTSStepExecStat_Completed And _
stp_sql.ExecutionResult = DTSStepExecResult_Failure Then

stp_sql.GetExecutionErrorInfo CLng(error_code)

msgbox CLng(error_code)

end if

Any help is appreciated.

Rajesh

View 2 Replies View Related

Using DTS Object Model In Visual Basic

Apr 17, 2004

Hi Everyone,

I would like to know any good reference books or online material about using DTS Object Model in Visual Basic.

Thanks in advance.

With Regards,
kalyan

View 4 Replies View Related

Object Model API For Creating RDF Reports?

Nov 14, 2007

I need to create RDF files dynamically. As one example, I need to output a report that contains an OLAP table from an MDX query and will need to generate the RDL that represents the table on the fly. (Binding to a data source with any built-in control will not even come close to solving the problem. The actual requirements are extremely complex.)

In short... Rather than outputting the RDL XML the hard way is there an object model I can use to construct an RDL document with? Even if it's a bindhind-the-scenese, not-supported library?


Thanks,
Terry

View 1 Replies View Related

SSIS Design : Object Reference Not Set To An Instance Of An Object

Jun 22, 2006

In visual studio 2005, I create a new Integration Services Project. It tries to create the first package by default "Package.dtsx". The "Package.dtsx[Design]" tab displays

Microsoft Visual Studio is unable to load this document

Object reference not set to an instance of an object

I try to create new SSIS package or edit an existing one (from tutorial), I get the same error in the SSIS graphical user interface tab.

Thanks for your help.

View 3 Replies View Related

Database/Table Design Question - Object/Event Model

Dec 11, 2007

Hi,Facts:I created a database to support an application that tracks events ondifferent objects. The two main tables are tbl_Object andtbl_EventLog. Each table has unique ID and on the tbl_EventLog thereis FK for a record in the tbl_Object. The events are inserted all thetime for the same or different objects from the tbl_Object. There areabout 600,000 objects in the tbl_Object and 1,500,000 (and growing)events in tbl_EventLog.Question:The user often wants to know what the last event was for a specificobject.What is the best way of retrieving the last event?Should I simply do a max(eventdatetime) on a specific object? orShould I add a LastEventID column to tbl_Object and update it everytime a new event is inserted? or any other way to implement it?I chose the second method because I didn't think it made sense searchthe event table everytime the user wants to know the last event, but Iwanted to know what the experts thought.Please let me know what you think.Thank you,Oran Levin

View 5 Replies View Related

Support For Dtexec Options /Validate && /WarnAsError In Object Model?

Mar 12, 2008



[Microsoft follow-up]

Hi,
I'm pretty sure the answer to this is "no" but thought I'd ask anyway. Is there any way of mimicing the /Validate & /WarnAsError options of dtexec if executing a package using the object model?

If not, should I request it in the interests of consistency?

-Jamie

View 10 Replies View Related

Cannot Create An Instance Of The XML Document Object Model. MSXML May Not Be Registered

Jan 31, 2007



I have a small VB.Net 2005 app using the Microsoft.SQLServer.ManagedDTS.dll so I can use the SSIS/DTSx functionality.

The program ran fine in the IDE.

Then when I tried to create a setup project for it I recieved a warning that all dependancies for MSXML6.DLL were not found.

I clicked ok and the setup was created.

I tried to run the setup and it failed with "....msxml6.dll failed to register. HRESULT -2147023782. ...

So I said cancel the setup and registered msxml6.dll.

I deleted my setup project and recreated it. This time I did not get the warning about msxml6.dll dependancies.

I tried the setup again and it executed without any errors however when I run the program I now get:

"Cannot create an instance of the XML Document Object Model. MSXML may not be registered."

So I went back into the IDE with the project and now it will not run either. IT gets the same error.

Does anyone have any suggestions?

View 3 Replies View Related

SSIS And Regular Expressions

Feb 9, 2007

Hi,

I have a crappy old database that has an email field with a lot of bad data, and I need to use SSIS to extract a list of names & email addresses.

I have an OLE DB Source set up to pull the relevant columns out of the database. Is there a way that I could setup a Regular Expression based filter to disregard any rows where my email Regex does not match the value of the email column?

Thanks,
John

View 4 Replies View Related

How To Use Regular Expressions On SSIS?

Sep 27, 2007

Hi everyone,


Is it possible? I haven't idea how to implement as if it were done from conventional .Net code
I'd like to check every field for a plan file

First field NNNNNNN
Second field XXXNNNNNNN
,,

Thanks for any input or idea,

View 11 Replies View Related

InitCap Function In SSIS Expressions

Sep 29, 2006

How can you create the infamous INITCAP function to be used in my column transformation expressions?

View 4 Replies View Related

Valid Expressions Are Constants, Constant Expressions, And (in Some Contexts) Variables. Column Names Are Not Permitted.

Dec 11, 2007

I want to have this query insert a bunch of XML but i get this error...


Msg 128, Level 15, State 1, Procedure InsertTimeCard, Line 117

The name "ExpenseRptID" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted.

Msg 128, Level 15, State 1, Procedure InsertTimeCard, Line 151

The name "DateWorked" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted.

What am i doing wrong...Can anyone help me out!! Thanks!!

p.s I know this query looks crazy...


Code Block

IF EXISTS (SELECT NAME FROM sysobjects WHERE NAME = 'InsertTimeCard' AND type = 'P' AND uid=(Select uid from sysusers where name=current_user))
BEGIN
DROP PROCEDURE InsertTimeCard
END
go
/*********************************************************************************************************
** PROC NAME : InsertTimeCardHoursWorked
**
** AUTHOR : Demetrius Powers
**
** TODO/ISSUES
** ------------------------------------------------------------------------------------
**
**
** MODIFICATIONS
** ------------------------------------------------------------------------------------
** Name Date Comment
** ------------------------------------------------------------------------------------
** Powers 12/11/2007 -Initial Creation
*********************************************************************************************************/
CREATE PROCEDURE InsertTimeCard
@DateCreated DateTime,
@EmployeeID int,
@DateEntered DateTime,
@SerializedXML text,
@Result int output
as
declare @NewTimeCardID int
select @NewTimeCardID = max(TimeCardID) from OPS_TimeCards
-- proc settings
SET NOCOUNT ON

-- local variables
DECLARE @intDoc int
DECLARE @bolOpen bit
SET @bolOpen = 0
--Prepare the XML document to be loaded
EXEC sp_xml_preparedocument @intDoc OUTPUT, @SerializedXML
-- check for error
IF @@ERROR <> 0
GOTO ErrorHandler
--The document was prepared so set the boolean indicator so we know to close it if an error occurs.
SET @bolOpen = 1


--Create temp variable to store values inthe XML document
DECLARE @tempXMLTimeCardExpense TABLE
(
TimeCardExpenseID int not null identity(1,1),
TimeCardID int,
ExpenseRptID int,
ExpenseDate datetime,
ProjectID int,
ExpenseDescription nvarchar(510),
ExpenseAmount money,
ExpenseCodeID int,
AttachedRct bit,
SubmittoExpRep bit
)
DECLARE @tempXMLTimeCardWorked TABLE
(
TimeCardDetailID int not null identity(1,1),
TimeCardID int,
DateWorked DateTime,
ProjectID int,
WorkDescription nvarchar(510),
BillableHours float,
BillingRate money,
WorkCodeID int,
Location nvarchar(50)
)
-- begin trans
BEGIN TRANSACTION
insert OPS_TimeCards(NewTimeCardID, DateCreated, EmployeeID, DateEntered, Paid)
values (@NewTimeCardID, @DateCreated, @EmployeeID, @DateEntered, 0)
-- check for error
IF @@ERROR <> 0
GOTO ErrorHandler


--Now use @intDoc with XPATH style queries on the XML
INSERT @tempXMLTimeCardExpense (TimeCardID, ExpenseRptID, ExpenseDate, ProjectID, ExpenseDescription, ExpenseAmount, ExpenseCodeID, AttachedRct, SubmittoExpRep)
SELECT @NewTimeCardID, ExpenseRptID, ExpenseDate, ProjectID, ExpenseDescription, ExpenseAmount, ExpenseCodeID, AttachedRct, SubmittoExpRep
FROM OPENXML(@intDoc, '/ArrayOfTimeCardExpense/TimeCardExpense', 2)
WITH ( ExpenseRptID int 'ExpenseRptID',
ExpenseDate datetime 'ExpenseDate',
ProjectID int 'ProjectID',
ExpenseDescription nvarchar(510) 'ExpenseDescription',
ExpenseAmount money 'ExpenseAmount',
ExpenseCodeID int 'ExpenseCodeID',
AttachedRct bit 'AttachedRct',
SubmittoExpRep bit 'SubmittoExpRep')
-- check for error
IF @@ERROR <> 0
GOTO ErrorHandler

-- remove XML doc from memory
EXEC sp_xml_removedocument @intDoc
SET @bolOpen = 0


INSERT OPS_TimeCardExpenses(TimeCardID, ExpenseRptID, ExpenseDate, ProjectID, ExpenseDescription, ExpenseAmount, ExpenseCodeID, AttachedRct, SubmittoExpRep)
Values(@NewTimeCardID, ExpenseRptID, ExpenseDate, ProjectID, ExpenseDescription, ExpenseAmount, ExpenseCodeID, AttachedRct, SubmittoExpRep)
select @NewTimeCardID, ExpenseRptID, ExpenseDate, ProjectID, ExpenseDescription, ExpenseAmount, ExpenseCodeID, AttachedRct, SubmittoExpRep
from @tempXMLTimeCardExpense
-- check for error
IF @@ERROR <> 0
GOTO ErrorHandler

-- For time worked...
INSERT @tempXMLTimeCardWorked(TimeCardID, DateWorked, ProjectID, WorkDescription, BillableHours, BillingRate, WorkCodeID, Location)
SELECT @NewTimeCardID, DateWorked, ProjectID, WorkDescription, BilliableHours, BillingRate, WorkCodeID, Location
FROM OPENXML(@intDoc, '/ArrayOfTimeCardWorked/TimeCardWorked', 2)
WITH ( DateWorked DateTime 'DateWorked',
ProjectID datetime 'ProjectID',
WorkDescription nvarchar(max) 'WorkDescription',
BilliableHours float 'BilliableHours',
BillingRate money 'BillingRate',
WorkCodeID int 'WorkCodeID',
Location nvarchar(50)'Location')
-- check for error
IF @@ERROR <> 0
GOTO ErrorHandler

-- remove XML doc from memory
EXEC sp_xml_removedocument @intDoc
SET @bolOpen = 0


INSERT OPS_TimeCardHours(TimeCardID, DateWorked, ProjectID, WorkDescription, BillableHours, BillingRate, WorkCodeID, Location)
Values(@NewTimeCardID,DateWorked, ProjectID, WorkDescription, BillableHours, BillingRate, WorkCodeID, Location)
select @NewTimeCardID ,DateWorked, ProjectID, WorkDescription, BillableHours, BillingRate, WorkCodeID, Location
from @tempXMLTimeCardWorked


-- commit transaction, and exit
COMMIT TRANSACTION
set @Result = @NewTimeCardID
RETURN 0

-- Error Handler
ErrorHandler:
-- see if transaction is open
IF @@TRANCOUNT > 0
BEGIN
-- rollback tran
ROLLBACK TRANSACTION
END
-- set failure values
SET @Result = -1
RETURN -1

go

View 1 Replies View Related

Report Model Deployment : The Model ID Of The Submitted Model Must Match That Of The

Dec 5, 2005

Running 2005 Beta 3 Refresh.  When I first deploy, it works fine. Subsequent deployments yield the following error:

View 9 Replies View Related

Add Services To SSIS IServiceProvider Model?

Jun 22, 2006

Is there any mechanism for being able to add custom services into the SSIS service provider model so that they can be used by components at design and runtime? i.e. if I can currently access service implementations such as the IDtsConnectionService from the Initialize method of a custom component (or in a UI type editor), is there a way to add a service of my own?

Thanks

View 3 Replies View Related

Metadata Model In SSIS 2005

Aug 9, 2006

Hi *,

Can anyone tell me what Metadata Model Microsoft supports with SSIS 2005? DTS in 2000 was supporting OIM but I was not able to get some information about this topic on SSIS 2005.

The reason I need to know is that I wanna import some metadata from Business Objects Data Integrator into SSIS 2005 and Business Objects is supporting CWM....

I would appreciate your help!

Thank you,
Steve

View 19 Replies View Related

Is There Anyway To Do Data Mining Model Test Via SSIS Package?

Dec 1, 2006

Hi, all here,

I am wondering if there is any kind of ways for us to test data mining models via SSIS package? That'll be quite helpful if there is such a way.

Looking forward to hearing from your guidance and thanks a lot in advance.

With best regards,

Yours sincerely,

View 3 Replies View Related

SSIS Programming Model - Adding Custom Dll As An Executable To Package

Aug 8, 2007



I am trying to add a custom dll(IncrementTask avalilable in SQL Server DTS Samples)
as an executable(Task) to an SSIS package.


The following console application consumes the Custom dll:



using System;

using Microsoft.SqlServer.Dts.Runtime;

using Microsoft.SqlServer.Dts.Tasks.FileSystemTask;

using Microsoft.SqlServer.Dts.Samples;

using Microsoft.Samples.SqlServer.Dts;





namespace Microsoft.SqlServer.Dts.Samples



{

class Program

{

static void Main(string[] args)

{

Package p = new Package();

// Add a File System task to the package.

//This Line of code works fine.

//TaskHost execPkghost = (TaskHost)p.Executables.Add("STOCKQLTask");




//This line throws the following error: Object reference not set to an instance of an object.

TaskHost execPkghost = (TaskHost)p.Executables.Add("Microsoft.Samples.SqlServer.Dts.IncrementTaskUI,IncrementTaskCS,
Version=1.0.0.0,Culture=Neutral,PublicKeyToken=b23be0feabed1355");



TaskHost thFileSystemTask = execPkghost as TaskHost;



// Iterate through the package Executables collection.

Executables pExecs = p.Executables;

foreach (Executable pExec in pExecs)

{

TaskHost taskHost = (TaskHost)pExec;

Console.WriteLine("Type {0}", taskHost.InnerObject.ToString());

}

Console.Read();

}

}

}


I am getting a runtime error that "object reference has not been set to an instance of the object".
Any help on this is higly appreciated.

View 3 Replies View Related

Custom Object In SSIS

Apr 2, 2007

I wrote a C# class that has a couple of methods that can be called to grab data out of a flat file and import it to a DB. This class was written for a web applicaiton originally. (class has many complex business rules in it)



Now I would like to use this same class in a SSIS package.



Is it possible in a script task to create a new object with my class and use it's methods?



In the end all I want SSIS to do is create my object, call a method in that object and be done.



If I was doing this in DTS, I would have to create an .Net EXE that used my class but I'm hoping to avoid that in SSIS.



Frenchy

View 19 Replies View Related

SQL 2012 :: SSIS Project Deployment Model Miscellaneous Files Not Being Deployed

Jul 9, 2015

I have an existing project that I have added a simple text file. I am using the Project Deployment Model for this project. I save the project, close it and open the project and the file is there under the Miscellaneous folder. I successfully deployed the project to the server. When I retrieve the project using the Integration Services Import Project Wizard, all of my package modifications are there and the packages up to date but the txt file I added to the Miscellaneous folder is not there.

View 1 Replies View Related

SSIS Data Mining Model Training Transform (Nested Tables)

Oct 26, 2006

I can't figure out how to put nested tables into the Data Mining Model Training Transform (SSIS). I can do a simple case table, but how do you get those nested tables with DM Training Transformation? Any ideas? Samples?

Thanks in advance,

-Young K

View 3 Replies View Related

SSIS Transfer Database Object Task

Sep 13, 2007

Hi everyone
Can any one help me I am using Tranfer databse object task when I am trying to run it its throwing exception can not send null value in login name????

View 7 Replies View Related

Error: SSIS Runtime Object Could Not Be Created.

May 26, 2006

I am using SQL Server 2005 Version  9.00.1399.06 (Intel X86).

Whether I try to start a new Integration Services project in Visual Studio or try to import data into a database I receive the following error: 

SSIS Runtime Object could not be created.  Verify the DTS.dll is available and registered.   The wizard can not continue and will terminate.

Unable to cast COM of type 'Microsoft.SqlServer.DTS.Runtime.Wrapper.PackageNeutralClass' to interface type
'Microsoft .SqlServer.DTS.Runtime.Wrapper.IDTSContainer90'
This operation failed because the QueryInterface call on the COM component for the interface failed due to the following error:  Library not registered.  (Exception from HRESULT:  0X80028010) (TYPE_E_LIBNOTREGISTERED)).

I have no idea why I am getting this error and would appreciate any help.  I'm sure some of you SQL Server Gurus will know right away.

 

 

View 7 Replies View Related

SSIS Error: Unable To Cast COM Object

Oct 10, 2007

Hi,

I get the following error opening an existing (or working) ssis package on my new server.

Error loading 'TestExecutionFromScript.dtsx' : Unable to cast COM object of type 'Microsoft.SqlServer.Dts.Runtime.Wrapper.PackageNeutralClass' to interface type 'Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSContainer90'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{8BDFE892-E9D8-4D23-9739-DA807BCDC2AC}' failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))..

I found in a blog that this is caused due to a dll which is not registered ("DTS.dll")

Can anyone try to explain the exact reason for this? I am not even able to execute a package from the command prompt using the dtexec utility. I have "Microsoft SQL Server Analysis Services Designer Version 9.00.3042.00" on my server. My other machine which executed this package successfully was running "Microsoft SQL Server Analysis Services Designer Version 9.00.1399.00".

Thanks very much for any kind of help.

View 3 Replies View Related

SSIS Runtime Object Could Not Be Created Error:

May 30, 2006

I am using SQL Server 2005 Version 9.00.1399.06 (Intel X86).

Whether I try to start a new Integration Services project in Visual Studio or try to import data into a database I receive the following error:

SSIS Runtime Object could not be created. Verify the DTS.dll is available and registered. The wizard can not continue and will terminate.

Unable to cast COM of type 'Microsoft.SqlServer.DTS.Runtime.Wrapper.PackageNeutralClass' to interface type
'Microsoft .SqlServer.DTS.Runtime.Wrapper.IDTSContainer90'
This operation failed because the QueryInterface call on the COM component for the interface failed due to the following error: Library not registered. (Exception from HRESULT: 0X80028010) (TYPE_E_LIBNOTREGISTERED)).

I have no idea why I am getting this error and would appreciate any help. I'm sure some of you SQL Server Gurus will know right away.

View 13 Replies View Related

SSIS Dataflow Object Not Installed Properly... Help.

Mar 22, 2006

Hi Folks,

When I try to drag and drop the Multicast dataflow item onto the Data Flow design surface I get the error below. I have uninstalled and reinstalled SQL Server 2005 to no avail. By experimentation I have discovered that the following Data Flow Transformations raise this error as well:

DTSTransform.Aggregate.1
DTSTransform.Multicast.1
DTSTransform.Sort.1

Any thoughts, comments, or pointers? I would really like this to work!

Thanks for your help,

D ;-)



ERROR MESSAGE BEGINS HERE:

===================================

The component could not be added to the Data Flow task.
Please verify that this component is properly installed. (Microsoft Visual Studio)

===================================

The data flow object "DTSTransform.Multicast.1" is not installed correctly on this computer. (Microsoft.DataTransformationServices.Design)

------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%u00ae+Visual+Studio%u00ae+2005&ProdVer=8.0.50727.42&EvtSrc=Microsoft.DataTransformationServices.Design.SR&EvtID=PipelineObjectNotInstalled&LinkId=20476

------------------------------
Program Location:

at Microsoft.DataTransformationServices.Design.DtsBasePackageDesigner.GetPipelineInfo(String creationName, IServiceProvider serviceProvider)
at Microsoft.DataTransformationServices.Design.DesignUtils.GetNewPipelineComponentObjectName(IDTSComponentMetaDataCollection90 parentCollection, String clsid, IDTSComponentMetaData90 componentMetadata, PipelineComponentInfo& pipelineComponentInfo)
at Microsoft.DataTransformationServices.Design.PipelineTaskDesigner.AddNewComponent(String clsid, Boolean throwOnError)

View 1 Replies View Related

Deleting Files Using SSIS Scripting Object

Jun 5, 2006

I am utlizing a scripting object in my ssis to combine two text files into one final file, and then I want to delete the original files. To do this I am utilizing the FileSystemInfo namespace and associating the file names, then utilizing the DELETE functionality.

The creation of the final file works perfectly...unfortunately, my base files do not delete, and I do not get a failure message or indictator.

Here is my code:


' Microsoft SQL Server Integration Services Script Task
' Write scripts using Microsoft Visual Basic
' The ScriptMain class is the entry point of the Script Task.

Imports System
Imports System.Data
Imports System.Math
Imports System.IO
Imports System.IO.File
Imports System.IO.FileSystemInfo
Imports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain


' The execution engine calls this method when the task executes.
' To access the object model, use the Dts object. Connections, variables, events,
' and logging features are available as static members of the Dts class.
' Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
'
' To open Code and Text Editor Help, press F1.
' To open Object Browser, press Ctrl+Alt+J.

Public Sub Main()

Dim strCurrentMonth As String
Dim strCurrentYear As String
Dim strWriteFileName As String
Dim strReadHeaderFileName As String
Dim strReadBodyFileName As String

'Utilizing a case statement, determine the monthname & year and set the appropriate variables
Select Case Month(Now())
Case 1
strCurrentMonth = "January"
Case 2
strCurrentMonth = "February"
Case 3
strCurrentMonth = "March"
Case 4
strCurrentMonth = "April"
Case 5
strCurrentMonth = "May"
Case 6
strCurrentMonth = "June"
Case 7
strCurrentMonth = "July"
Case 8
strCurrentMonth = "August"
Case 9
strCurrentMonth = "September"
Case 10
strCurrentMonth = "October"
Case 11
strCurrentMonth = "November"
Case 12
strCurrentMonth = "December"
End Select

strCurrentYear = Year(Now()).ToString

'Set variables with file names (reader files and write file) for ease in readability and to
'set final (write file) with appropriate nameing convention utilized by Matria HealthCare.

strWriteFileName = "\CUPSRV05SHAREDISPublicData ExportMatriaFiles TO Matriacup_ref_cup_" & strCurrentMonth & strCurrentYear & "_ftp_ReferralFormat.txt"

strReadHeaderFileName = "\CUPSRV05SHAREDISPublicData ExportMatriaFiles TO MatriaMatria_Referral_Control.txt"

strReadBodyFileName = "\CUPSRV05SHAREDISPublicData ExportMatriaFiles TO MatriaMatria_Referral.txt"

'create stream reader/writer objects

Dim sr As New StreamReader(strReadHeaderFileName)
Dim sr2 As New StreamReader(strReadBodyFileName)
Dim sw As New StreamWriter(strWriteFileName)

'feed the header record into the final file

Do Until sr.Peek = -1
'write the header record
sw.WriteLine(sr.ReadLine)
Loop

'close the read stream for the header record file
sr.Close()

'Feed the body records into the final file
Do Until sr2.Peek = -1
'write all base records
sw.WriteLine(sr2.ReadLine)
Loop

'close the read stream for the body records
sr2.Close()

'close the write stream for the final distribution file
sw.Close()

'dispose of all stream objects
sr.Dispose()
sr2.Dispose()
sw.Dispose()

Dim EligBaseFile As New FileInfo("strReadBodyFileName")
Dim EligHeaderFile As New FileInfo("strReadHeaderFileName")

EligBaseFile.Delete() <--These do not delete or through an error
EligHeaderFile.Delete()

'final statement for SSIS package to determine script result

Dts.TaskResult = Dts.Results.Success

End Sub

End Class

I would appreciate any light you can shed on this. Thanks!

View 5 Replies View Related

Integration Services :: Using Object Variable In SSIS?

Aug 17, 2015

I have one scenario. I am calling all columns result set to an variable and inside for each loop container using script task to get message about how many columns are coming in the loop.

At last using send mail task to send automated mails to group of people,but issue it is taking only person's mail id and coming out of loop.

how to call object type variable ?

View 4 Replies View Related

Integration Services :: SSIS COM Error Object Information Is Available

Dec 2, 2015

When i use single object variable to pass it to two sequence container having 2 different  Foreach ADO Enumerator; seems like the scope of the variable is completed once sequence container 1 is done and second fails with below error

Foreach ADO Enumerator
Error: COM error object information is available.  Source: "ADODB.Recordset"  error code: 0x800A0BCD  Description: "Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.".

Does we have to set any property so that object variable scope persist until both loops are completed.

It works fine if i push the data to 2 different object variables.

View 2 Replies View Related

Can We Pass Form Object Like Progress Bar To An Ssis Package

Dec 11, 2006

Hi friends,

The problem that i am facing right now is that I have to show progress bar in my vb front end Application code which call my package using the

Application.LoadPackage(pakage Nothing).

What i am intending is that , I pass my progress bar instance to Package object and as the package executes, I

am changing the progress bar value to reflect the progress of execution.



Please Help ME.. with ur valuable responses



Regards

Maheswar

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved