31.1.12

Update Query with Inner join in SQL Server

Suppose, If you want update a table based on some other references from other table. In that case, you can go for the below query to update the table.

update z

set z.YearlyIncome = b.YearlyIncome
from DimCustomer z inner join TEMP_DimCustomer b
on z.CustomerKey=b.CustomerKey

Cheers,
Venkatesan Prabu .J

30.1.12

To check file exists or not in c#

Method to check whether the file is exist or not,



C#



if(System.IO.File.Exists(@”d:\mytest.xml”))

{

       //True statements comes here

}


This code check whether a file named “mytest.xml” exist in the D:\ drive or not.

Cheers,
Venkatesan Prabu .J

27.1.12

Unable to invoke a class in C#

I've tried to invoke an object for a class in the external project in Windows Forms (C#).

using

Somehow, I've added the dll as the reference.
Tried to add the namespace. Unfortunately, I couldn't include the namespace.

Digging the content, I found the real reason for this issue.  The reason is,


1. The class is not declared as public
2. May be the issue is with the namespace.

Cheers,
Venkatesan Prabu .J
ExcelObject;

Exception from HRESULT: 0x800AC472

Exception from HRESULT: 0x800AC472 - We will get this error while creating excel sheet through C# or while populating the data from the database considering SQL Server.

Reason: A normal issue happening due to cross-threading in the applicaiton.

It's due to user's interruption while Excel document creation or any other process interrupting Excel document creation.

Cheers,
Venkat

Toggle key issue in Windows Vista

While pressing Control button for a quite long time, you will be entered into Toggle key mode.

It disables some of the necessary functionalities like moving the cursor. In turn, it will select the content instead of navigating the cursor.

Do not get tensed on this issue? here is the solution for the same.

http://askville.amazon.com/turn-filter-keys/AnswerViewer.do?requestId=10388385

In simple words, Press both the shift button, you will comeout from the toggle mode.

All the best.

Cheers,
Venkatesan Prabu .J
Head, KaaShiv InfoTech, Chennai

24.1.12

Dotnet 4.0 Chart issue

While working with Chart control in .net 4.0. I found the below issue.

A chart element with the name 'Default' could not be found in the 'ChartAreaCollection'.

Reason for the issue: It indicates that, the element default is not initilized as ChartAreaCollection.

To resolve this problem, we need to create it.

chartl.ChartAreaCollection.Add("Default");

The above line will resolve the problem.

Cheers,
Venkatesan Prabu .J
Head, www.kaashivinfotech.com

14.1.12

Time dimesions in SSAS

Wish you happy new year to all my readers.

Once I have started working on Time dimesions for SSAS cubes. I got a peculiar error while executing it. Below is the error,

A time dimension is required to enable this functionality. Ensure that you have a dimension of type Time,
that contains at least one hierarchy with a level flagged as a time period.

The reason for this issue is,

1. Atleast one dimensions for the cube should have the type as "Time"
2. So that, the cubes data can be evaluated based on the time dimensions.

To create Time dimensions, click "Add Business Intelligence"


 For the Time dimensions, you need to right click and change the type in the properties window.




Cheers,
Venkatesan Prabu .J