HOW TO FILL GRID VIEW WITH OUT USING SQLDATASOURCE AND
PROGRAMING?
Answer Posted / manumole
SqlConnection conn = new SqlConnection("Data
Source=MYSERVER;Initial Catalog=Northwind;User
Id=sa;Password=sa;");
conn.Open();
DataTable dt=new DataTable();
SqlDataAdapter da = new SqlDataAdapter("select
* from Employees", conn);
da.Fill(dt);
testGV.DataSource = dt;
| Is This Answer Correct ? | 15 Yes | 8 No |
Post New Answer View All Answers
Define different execute methods of ADO.NET command object ?
Difference between sqlcommand and sqlcommandbuilder?
What is the difference between sqldatareader and sqldataadapter?
Can you explain how to enable and disable connection pooling?
What is the use of SqlCommand object?
What providers does Ado.net uses?
Explain what is datagrid with an example?
What are the namespaces used in ado.net for data access?
What is a dataview?
What are the different row versions available in table?
What are the key events of sqlconnection class?
What is the meaning of executenonquery?
how Sequence to connect and retrieve data from database using dataset?
What is the procedure to call a Stored Procedure of Back End in ADO (ActiveX Data Object) and RDO (Remote Data Objects)?
What is aggregating data ?