ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  ADO.NET
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions
 C Sharp interview questions  C Sharp Interview Questions
 ASP.NET interview questions  ASP.NET Interview Questions
 VB.NET interview questions  VB.NET Interview Questions
 COM+ interview questions  COM+ Interview Questions
 ADO.NET interview questions  ADO.NET Interview Questions
 IIS interview questions  IIS Interview Questions
 MTS interview questions  MTS Interview Questions
 Crystal Reports interview questions  Crystal Reports Interview Questions
 BizTalk interview questions  BizTalk Interview Questions
 Dot Net interview questions  Dot Net Interview Questions
 Exchange Server interview questions  Exchange Server Interview Questions
 SharePoint interview questions  SharePoint Interview Questions
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
HOW TO FILL GRID VIEW WITH OUT USING SQLDATASOURCE AND 
PROGRAMING?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: HOW TO FILL GRID VIEW WITH OUT USING SQLDATASOURCE AND PROGRAMING?
Answer
# 1
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 ?    9 Yes 3 No
Manumole
 
  Re: HOW TO FILL GRID VIEW WITH OUT USING SQLDATASOURCE AND PROGRAMING?
Answer
# 2
Drag and drop the table on browser,difultly it shows grid 
view ..
 
Is This Answer Correct ?    4 Yes 4 No
Srikanth Chodavarapu
 
 
 
  Re: HOW TO FILL GRID VIEW WITH OUT USING SQLDATASOURCE AND PROGRAMING?
Answer
# 3
we can fill grid view by using sqldataadapter and dataset.
the code will be as follows........

using System.data.sqlclient (add namespace)

in code part.... 

sqlconnection con=new sqlconnection("server=(the server 
which u use);database=(database in which your table 
located);user id=;password=");

sqldataadapter da=new sqldataadapter("select * from 
table",con);
dataset ds=new dataset();
da.fill(ds); 
gridview1.datasourse=ds;
gridview1.databind();
 
Is This Answer Correct ?    4 Yes 1 No
Sai_sanju84@yahoo.com
 

 
 
 
Other ADO.NET Interview Questions
 
  Question Asked @ Answers
 
What are relation objects in dataset and how & where to use them?  1
About ado.net components/objects. Usage of data adapters and tell the steps to retrieve data ? MMTS1
what is the syntax code for oldb to connect oracle?  1
What are the steps in connecting to database ? Microsoft2
How do you merge two datasets into the third dataset in a simple manner? IBM2
How to check if a datareader is closed or opened?  1
When multiple users attempt to modify data at the same time Ex user 1 is updating record at same time user2 deleted record sucessfully.now user1 has press update button . how to handle concurrency  3
How to you declare connection strings and how to you make use of web.config ? MMTS2
i have two textboxes one for user name and another for password . i have a table name compare(which contains name,passwod etc.,)my doubt is how compare username textbox with name column and how compare password textbox with passwod column. i want the code Wipro5
HOW TO FILL GRID VIEW WITH OUT USING SQLDATASOURCE AND PROGRAMING?  3
can we have multiple datatables in a datareader ? Ness-Technologies14
Which type of database is used while processing dynamic database? Microsoft1
What we do with the object of ado.net dataset after using it?Can we dispose it or can we set it nothing?Is it must or not? SVI4
Can you edit data in the Repeater control?  8
Explain what a diffgram is and its usage ?  1
what is a dataset? Choice-Solutions5
What are the attirbutes of DataSet? IBM5
What is ODP.NET ? TCS1
If i am expecting a single result from sqlserverdatabase then what command should i follow ?sqlcommand.executereader (commandbehaviour.singleresult)or sqlcommand.executescalar()  4
What does connection string consists of ? Digital-GlobalSoft1
 
For more ADO.NET Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com