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 aggregating data ?
What is the hierarchy of data in databases?
Which one of the following objects is a high-level abstraction of the connection and command objects in ado.net?
How do I delete a row from a DataTable?
What is the difference between Data adaptor and Data set?
Explain the various objects in dataset.
What is the difference between Command and CommandBuilder object?
What is sqldatasource?
What are the difference between readonly vs. Const?
Define the data provider classes that is supported by ado.net?
What is XML serialization
What is DataReader Object?
What is isolation?
What is difference between executenonquery and executequery?
What is openrowset?