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

Why do we use sqldataadapter?

1001


What is ado and dao?

1001


What is ado.net architecture?

969


What are the advantages using ado.net?

1083


What are the difference between readonly vs. Const?

1059


Explain the difference between ado and ado.net?

993


What is microsoft ado.net?

1220


Why do we serialize data?

1005


Explain the various objects in dataset.

1046


What is ole data type?

969


What is the use of SqlCommand object?

1283


What is the difference between oledb sql server and oledbdotnet provider?

1055


What is ado or jdbc?

977


What is the difference between Dataset. clone and Dataset.copy?

1092


What is the meaning of object pooling?

1310