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

What is ado and rdo?

860


How to bind the controls(best practice) comboboxes to the data in the dataset?

1003


How to check if a datareader is closed or opened? IsClosed()

967


What are the different namespaces used in the project to connect the database? What data providers available in .net to connect to database?

1271


What is disconnected architecture in ado.net?

943


What is the current version of entity framework?

900


Explain advantages of ado.net?

998


What are the Features and disadvantages of dataset

1034


Give few examples of datareader that is used in different dataproviders.

925


What is the difference between Datareader and Dataset?

1025


How to aggregating data across related tables?

974


Define bubbled event?

868


Which is faster entity framework or ado.net?

879


Explain how to create dynamic gridview?

919


What is the difference between data reader and data adapter?

963