Wednesday, December 19, 2007

Whats new in Microsoft Visual Studio 2008

There is some new technical support in Microsoft Visual Studio 2008

New Feature

MSDN Success Builder

Ther is some points for Onsite....

MSDN Success Builder

Tuesday, December 18, 2007

setting conditional value in variable - SQL

declare @s1 varchar(100)
declare @s2 varchar(100)
set @s1 = ''
set @s2 = 'A1'

set @s1 =case
when @s2='A' Then 'Rajesh'
when @s2='A1' Then 'Rishabh'
else 'Kum' end
print @s1

Thursday, December 13, 2007

HOW TO CONVERT COLUMN VALUE IN COMMA SEPARATED STRING


USE Northwind
GO

DECLARE @strCSV varchar(1000)
SET @strCSV= ''
SELECT @strCSV = @strCSV +','+ FirstName FROM
Employees
SET @strCSV = SUBSTRING(@strCSV,2,LEN(@strCSV))
print @strCSV

insert dummy row in table

--select * from employees
create table t1
(
rid int identity(1,1) not null primary key,
rname varchar(1000),
AddedOn datetime,
AddedBy varchar(100)
)
declare @iCounter int
set @iCounter = 1
while @iCounter < 10000
begin
insert into t1 values('rajesh'+cast(@iCounter as varchar),getdate(),suser_sname())
if @iCounter = 500 break -- if you want break after particular number of interval
set @iCounter= @iCounter +1
end

select * from t1
drop table t1

Tuesday, December 11, 2007

Drag file from your desktop and drop on File upload control

Have a look of this post
Mozila firefox compatible

http://googlesystem.blogspot.com/2007/02/upload-files-in-browser-using-drag-and.html


View post

Fun

Husband asks: Do you know the meaning of WIFE?
It means…

With out Information, Fighting Every time!

WIFE says: No darling, it means:-

With Idiot For Ever

How to find rows and column in Dataset

IN VB.NET
variable as String=DataSet.Table(0).Rows(index)(column-index).ToString();

IN C#.NET

string variable=DataSet.Table[0].Rows[index][column-index].ToString();

Example:

string name=DataSet.Table[0].Rows[3][2].ToString();

e.g.

["for(i=0 ; i<[rows.count];i++)"]
{
string name=DataSet.Table[0].Rows[i][2].ToString(); 'where [2] is column index or you can put column name like ["col_name"]

}]