specify database that u want to use. sql server, access, mysql, oracle, etc..
Jx_Man
Nearly a Senior Poster
3,329 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444
try this :
first you must made module to connect access to vb.net
add this following code in your module connected :
Module MyModule
Public Function Conection() As OleDb.OleDbConnection
Dim con As OleDb.OleDbConnection
con = New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Application.StartupPath.ToString & "\yourDatabaseName.mdb")
Return con
con = Nothing
End Function
End Module
after that you can call this module in your form code to connect with access db
ex :
Dim Connected = MyModule.Koneksi
then u can open connection (Connected .Open()) or close connection (Connected.close())
OK.
Hope this code helpfull
Jx_Man
Nearly a Senior Poster
3,329 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444