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
Describe briefly an ADO.NET Dataset ?
What are all components of ADO.Net data provider?
What is a control toolbox?
What is ado rdo dao in visual basic?
Explain how to create dynamic gridview?
What are the steps you will take to improve performance?
Does ado.net use odbc?
Explain the basic use of "dataview" and explain its methods.
What is difference between entity framework and ado.net?
What are the Features of a dataset
What is difference between datareader and dataadapter?
Explain the role of data provider in ado.net? What is the role of data provider in ado.net?
What is the difference between ado.net and oledb?
What are the advantages of ado.net?
What are the ado.net objects?