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 are the several execute methods of ado.net?
Define atomicity?
What is the default Timeout for SqlCommand.CommandTimeout property?
Explain the overview of ado.net architecture?
Which architecture does Datasets follow?
How can we add relation between tables in a dataset?
How will you fill the gridview by using datatable object at runtime?
What is csdl entity framework?
Explain the various objects in dataset.
How to check if a datareader is closed or opened? IsClosed()
What is namespace in ado.net?
What are different layers of ADO.Net?
What is ado in agriculture?
What is typed dataset ?
What is meant by executenonquery?