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                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
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 you declare connection strings and how to you make
use of web.config ?
 Question Submitted By :: Deepa
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How to you declare connection strings and how to you make use of web.config ?
Answer
# 1
in 
web.config file
<appsetting>
<add key="constr" value="data source=database name;
                      database=database name"/>
</appsetting>

and 
 in .aspx file
string str=configurationsetting.appsetting.constr;
 
Is This Answer Correct ?    1 Yes 0 No
Ansu Kumar
 
  Re: How to you declare connection strings and how to you make use of web.config ?
Answer
# 2
In web.config file just plase

<appSettings>
<add key="ConStr" value="Provider=SQLOLEDB.1;User 
ID=sa;Initial Catalog=Sample;Data Source=ABC"></add>
</appsettings>

and in CS file

sqlconnection con = new sqlconnection
(ConfigurationSettings.AppSettings["ConStr"]);

and u can u this connection any where in ur App.
 
Is This Answer Correct ?    1 Yes 0 No
Prasad
 
 
 

 
 
 
Other ADO.NET Interview Questions
 
  Question Asked @ Answers
 
If a table contains 20000 records . In a page at each time 100 records to be displayed. What are the steps u will take to improve performance? will you use dataset or datareader?  6
What is Pooling? what is data pooling? what is sql pooling? TCS1
what is different between SqlCommand object and Command Behaviour Object  3
What is main five diffrent between Connected And Disconnected environment Wipro4
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 can you implement sub data grid in a master datagrid?  1
How to Handle the exceptions in Sqlsrver2000 SQL-Star3
Being fresher How would i answer to the question that what is your salary exception?  3
Call a stored procedure from ado.net and pass parameter to it ? Keane-India-Ltd5
what is a dataview?why is it used for? Choice-Solutions3
What is the provider and namespaces being used to access oracle database? Microsoft2
What are the ADO.NET Controls?  6
How do u implement locking concept for dataset? ABC2
Where do you store connection string ? Digital-GlobalSoft1
Difference between ADO and ADO.Net IBM4
what is the syntax code for oldb to connect oracle IBM2
What is the provider and namespaces being used to access oracle database? Microsoft4
What provider ADO.net use by default? Accenture5
Write steps of retrieving data using ado.net ? Keane-India-Ltd2
what is bubbled event can u pls explain Wipro3
 
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