OleDb Database Connection using Class in VB.net :
Step - 1 : Open a Visual studio & Create a new project,
Step - 2 : Create a Database Connection & Manage Data Source,
Step - 3 : Then Open a Solution Explorer & Create New Class File and Write a code into class file, then Finally you can use a class connection with your needed windows form & other applications,
Database Connection using Class Source Code in VB.net :
Imports System.Data.OleDb
Public Class Class1
Public Function connection() As OleDbConnection
Dim con As OleDbConnection
con = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\example.mdb")
Return con
End Function
End Class
0 comments:
Post a Comment