how to map a row in temp table in asp.net (Vb.net)

Go To StackoverFlow.com

-1

I have a temp table and i want to map data from it like we can in sql e.g "Select name from tablName where name=@name" . I want to do same thing in asp.net(vb.net) code behind. Thanks in advance.

2012-04-04 05:16
by Ram Singh
show some code, how the data table is declared n al - Ravi Gadag 2012-04-04 05:33


0

I asked how to use select statement in code behind. so i got answer is:-

 string sqlFilter = "Id = '" + userid + "'";
  DataRow[] data = dt.Select(sqlFilter);
2012-07-09 12:37
by Ram Singh


0

@Ram Singh: Suppose your temp table is like bellow one

Create Table #temp( Name varchar(250) )

your select query will be like this

Select Name from #temp WHERE Name = @name
2012-04-04 05:29
by R.D.
sir it is in sql and i m asking in vb.net - Ram Singh 2012-04-04 05:58
reader = sqlcmd.ExecuteReader()
if reader.Read() then '' <<<<< newly inserted code result = reader.GetString("Name") end if

reader.GetString("Name") Name will be the column name in temporary table - R.D. 2012-04-04 07:34

Ads