help RRS feed

  • Question

  • i want to know how to connect my visual basic 2008 project to microsoft access 2000 please reply me soon is urgent.


    Friday, February 15, 2008 4:27 PM

All replies

  • You can use to retrieve and save data from access 2000 database
    Saturday, February 16, 2008 5:38 PM
  • Code Snippet

    Imports System.Data.Odbc

    Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    Using cn As OdbcConnection = New OdbcConnection("Driver={Microsoft Access Driver (*.mdb)};Dbq=F:\Documents and Settings\Adam\Desktop\Northwind.mdb;")


    Dim myQuery As String = "SELECT * FROM Customers"

    Using cmd As OdbcCommand = New OdbcCommand(myQuery, cn)

    Dim rdr As OdbcDataReader = cmd.ExecuteReader

    While rdr.Read And rdr.HasRows


    End While

    End Using

    End Using

    End Sub

    End Class



    Saturday, February 16, 2008 5:57 PM