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 connection string?
Explain what is datagrid with an example?
What is ado.net components?
What is the advantage of ado.net?
What is the difference between Data adaptor and Data set?
What is the difference between Dataset. clone and Dataset.copy?
Explain executenonquery?
What is the use of data grid?
What is data view and variable view?
What is DataReader Object?
how we can fire event in databound coulm in datagfrid withot using button?
What is microsoft ole db provider for sql server?
Which is better ole db or odbc?
What is ado recordset?
What is the difference between Response.Expires and Reponse.ExpiresAbsolute?