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   SiteMap shows list of All Categories in this site.
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 would u connect to database using .NET?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How would u connect to database using .NET?
Answer
# 1
sqlconnection cn =new sqlconnection("uid=sa;pwd=sa;data 
source=servername;database=databasename");
 
Is This Answer Correct ?    5 Yes 0 No
Ramakrishna
 
  Re: How would u connect to database using .NET?
Answer
# 2
SqlConnection conn = new SqlConnection("Data 
Source=ServerName;Initial Calalog=DatabaseName;User 
ID=username;Password=password")
 
Is This Answer Correct ?    7 Yes 0 No
Rajeev Ranjan Lall
 
 
 
  Re: How would u connect to database using .NET?
Answer
# 3
go to project->add reference->adodb

DECLERATION

    Dim con As ADODB.Connection
    Dim cmd As ADODB.Command
    Dim str, cnstr, sql As String
    Dim cn As OleDb.OleDbConnection


FORM LOAD 
     
    Private Sub Form1_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load
        con = New ADODB.Connection
        con.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\new folder\employee.mdb")
    End Sub

in the source you have to give the path of ur file name..
 
Is This Answer Correct ?    1 Yes 2 No
Rathish
 

 
 
 
Other ADO.NET Interview Questions
 
  Question Asked @ Answers
 
What are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET?  2
once data is fetched into dataset connection gets closed. but in datareader connection is always maintained...then why datareader is fast and mainly recommended ?  2
Call a stored procedure from ado.net and pass parameter to it ? Keane-India-Ltd5
What are the three Objects of ADO.  8
How to get oledb connection?  3
how to add a selected row of a gridview to another gridview without reloading the page??  1
Which method do you invoke on the DataAdapter control to load your generated dataset with data? Veegyapan-Impacts3
What is the namespace in which .NET has the data functionality classes? eMantras4
What is dataset and tell about its features. What are equivalent methods of previous, next etc. Of ADO in ADO.NET ? Digital-GlobalSoft1
Which is the best institute in navi mumbai to learn DotNet  1
What is sequence of code in retrieving data from database ? Accenture2
Being fresher How would i answer to the question that what is your salary exception?  3
How would u connect to database using .NET? TCS3
Where does ADO.NET and XML web services come in the architecture ? TCS1
what is different between SqlCommand object and Command Behaviour Object  3
what is connection pooling ? Vertex3
What are the Different layers in ADO.Net? eXensys7
What is the provider and namespaces being used to access oracle database? Microsoft2
how to keep track of index in listbox items.  2
What is datatable?  3
 
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