Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How would u connect to database using .NET?

Answer Posted / rathish

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 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe briefly an ADO.NET Dataset ?

1089


What are all components of ADO.Net data provider?

1060


What is a control toolbox?

968


What is ado rdo dao in visual basic?

1168


Explain how to create dynamic gridview?

980


What are the steps you will take to improve performance?

894


Does ado.net use odbc?

954


Explain the basic use of "dataview" and explain its methods.

1003


What is difference between entity framework and ado.net?

930


What are the Features of a dataset

1308


What is difference between datareader and dataadapter?

1051


Explain the role of data provider in ado.net? What is the role of data provider in ado.net?

1002


What is the difference between ado.net and oledb?

952


What are the advantages of ado.net?

913


What are the ado.net objects?

944