Click here to Skip to main content
15,936,709 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hie EvreryOne!

I want to know how to connect MS ACCESS database in Vb.NET ?
Posted

Google. You'll probably find a library that will make it incredibly easy for you.

If you aren't going to search for it yourself, then no-one is going to help you. :doh: :doh:
 
Share this answer
 
SQL
Imports System.Data.Oledb


    Dim con As New OledbConnection("Provider=microsoft.Jet.oledb.4.0DataSource=D:\mydata.mdb;")

    Dim cmd As New OledbCommand

    Public var1 As String

    Public Sub New()
        con.Open()

        cmd.Connection = con
        cmd.CommandText = "SELECT * FROM table1"

    End Sub

    Public Sub creates()
        cmd.CommandText = "INSERT INTO table1(Neyms) VALUES('" + var1 + "')"
        cmd.ExecuteNonQuery()

    End Sub
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900