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
What is ado and rdo?
How to bind the controls(best practice) comboboxes to the data in the dataset?
How to check if a datareader is closed or opened? IsClosed()
What are the different namespaces used in the project to connect the database? What data providers available in .net to connect to database?
What is disconnected architecture in ado.net?
What is the current version of entity framework?
Explain advantages of ado.net?
What are the Features and disadvantages of dataset
Give few examples of datareader that is used in different dataproviders.
What is the difference between Datareader and Dataset?
How to aggregating data across related tables?
Define bubbled event?
Which is faster entity framework or ado.net?
Explain how to create dynamic gridview?
What is the difference between data reader and data adapter?