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

Which is faster union or union all?

578


What is _viewstart?

504


How is mvc different from asp.net? : Asp.Net MVC

552


What is the difference between union and join?

565


What is the difference between a default skin and a named skin?

593






What is the difference between the get method () and post method ()?

520


What is mta?

629


What is a session government?

505


How to disable cut, copy and paste in TextBox using jQuery in asp.net?

634


Can you explain autopostback?

536


Explain MVC model binders?

599


What is the difference between user control and custom control?

486


Is asp.net 64-bit enabled? How?

589


What are the differences between clr & cts?

541


What are the different session state management options available in asp.net?

519