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
How to pass multiple tables in datasets simultaneously?
how to create a quiz software using 4 options to answer and how to check with answers in the database and award marks....
Define bubbled event?
how can implement dropdownlist in particular of dataset when try to update?
What is the difference between sqlcommand and sqldataadapter?
What is sqlconnection and sqlcommand?
What is ole data type?
What is isolation?
What is ole in vb?
What is difference between executenonquery and executequery?
How can we add/remove row's in "datatable" object of "dataset"?
What is dbcontext and dbset in entity framework?
What are the major challenges in accessing data from a database?
What are the Features of a dataset
Explain the basic use of "dataview" and explain its methods.