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
Why do we use sqldataadapter?
What is ado and dao?
What is ado.net architecture?
What are the advantages using ado.net?
What are the difference between readonly vs. Const?
Explain the difference between ado and ado.net?
What is microsoft ado.net?
Why do we serialize data?
Explain the various objects in dataset.
What is ole data type?
What is the use of SqlCommand object?
What is the difference between oledb sql server and oledbdotnet provider?
What is ado or jdbc?
What is the difference between Dataset. clone and Dataset.copy?
What is the meaning of object pooling?