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 difference between connected and disconnected architecture in ado.net?
What is ado data control?
Explain how to create dynamic gridview?
Define data access layer?
What is the use of data grid?
What are all the different methods under sqlcommand?
How can we load multiple tables in to dataset?
Explain ado.net features?
What is the difference between statement and preparedstatement interface?
What is a datareader object?
Is entity framework better than ado.net?
What is the role of clr?
What is ado and rdo?
What are the key events of sqlconnection class?
Name which operations can you not perform on an ado.net dataset?