Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

if i have 1000 records and i want to access 20 ata time
from SQL server, what will be the query?

Answer Posted / sunny

Assume EMP is my Table where 1000 Records there. We retrive
20 top record from database through by following c# code.
}
sqlconection cn = new sqlconnection(@"Conection string...");
dataset ds = new dataset();
SqldataAdapter da = new SqldataAdapter("select top 20 *
from Emp", cn);
da.fill(ds);
Gridview1.datasource = ds.table[0];
Gridview1.databind();
}

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is session handling in a webfarm, how it can work with its limits?

1090


What are the event handlers that we can have in global.asax file?

944


How will you load dynamic assembly? How will create assesblies at run time?

903


What are the security types in ASP/ASP.NET? Different Authentication modes?

1015


Can I tap into other windows livetm services?

953


How can you identify that the page is post back?

969


What are demand-paging and pre-paging?

964


What are triggers of an updatepanel?

940


How to create events for a control?

987


What is http session state?

931


Can we have a web application running without web.config file?

954


When should I use server transfer and response redirect?

956


How many types of controls are there in asp.net?

982


What are the uses of reflection?

1018


What is the basic purpose of the required field validator? How can you use a required field validator to check that the user changes the initial value of a text box? a listbox?

1843