Monday, June 24, 2013

SSIS : The AcquireConnection method call failed with error code 0xC0202009


You may get this SSIS error when you are using Excel connection in your package.

This error message does not provide any clue about actuall problem.

If system does not have 64bit excel driver to handle the excel file we will get this error.

becasue by default our MSBI try to run the package with 64bit drive provider and end up with error.

easiest way is to change the project property Run64BitRuntime to FALSE.



This solution does not work in Production where package is runs from scheduled job.

Note : I faced same error for other problem also, not easy to figure it out root cause easily always.

Happy coding....

Tuesday, February 5, 2013

Copy all files of the folder/directory in SSIS

File System Task does not have option for Copy the content of directory. Fortunately this can be easily achieved  with the help of Operation called Copy Directory in File System Task.

To accomplish this just mention Source folder and Destination folder path in the File System Task.

To start with, Create 2 variables
1. dest_path 
            Value : C:\WORK\Dest\ (or any other required destination path)
2. Source_Path
            Value : C:\WORK\Source\DATA (or any other required source path)

Now set these variables in File System Task

Double click on File System Task to edit the configurations.

In General Section,

Set the Operation to Copy Directory. Now,

set up these properties.

IsDestinationPathVariable : True
DestinationVariable : dest_path

IsSourcePathVariable : True
SourceVariable : Source_Path

OverwriteDestination : True (based on your requirement)

Thats it. Execution of File System Task will copy all the files exists in DATA folder to Destination folder C:\WORK\Dest\ including subfolders and subfolder content.

If you would like to create different folder at destination, you can do this by mentioning 
the new folder name in destination path as following statement.

C:\WORK\Dest\DATA_Dest

This example use variable to keep folder paths. for the same operation we can use File Connection manager.



Happy coding :)

Monday, April 9, 2012

External Javascript use in asp.net page

Experience : I wanted use javascript written in .js file in my ASP.NET page(.aspx page). I used following line of statement in my page to access the javascript file.

     <script src="Scripts/SimpleJS.js" type="text/javascript"/>

But it did not worked for me! 
when I browsed my page, it showed blank page in browser! I did not understand why it is happening at first glance. After that I tried below line of code,then it worked like magic

     <script src="Scripts/SimpleJS.js" type="text/javascript"></script>

I experienced in ASP.NET 4.0, probably same applies to other versions as well.

Happy Coding :)

Tuesday, June 7, 2011

Null, handle with care! in SQL Server

NULL value gives always suprise to every body one or the other time. I would like discuss my experience and experiments on NULL values in SQL server.

Saturday, June 4, 2011