VS 2010 connecting to Access 2007 db

Anyone know the code to connect to an Access 2007 db from VB 2010?
Sheldon LivingstonConsultantAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dirk HaestProject managerCommented:
You can find the connectionstring here:

http://connectionstrings.com/access-2007
Sheldon LivingstonConsultantAuthor Commented:
I'm looking for the complete code needed... diming connection object, etc.
Dirk HaestProject managerCommented:
Example (adjust the connectionstring)
http://www.startvbdotnet.com/ado/msaccess.aspx

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Sheldon LivingstonConsultantAuthor Commented:
Dhaest:  Oops... getting "could not find installable isam" error.
Dirk HaestProject managerCommented:
Are you sure that you changed the connectionstring correctly ? Is access installed on that machine ?
Sheldon LivingstonConsultantAuthor Commented:
       cn = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;_Data Source=C:\VSL\Estimating\estimating.accdb;Persist Security Info=False")
        'provider to be used when working with access database
        cn.Open()
        cmd = New OleDbCommand("select * from items", cn)
        dr = cmd.ExecuteReader
        While dr.Read()
            '            TextBox1.Text = dr(0)
            '           TextBox2.Text = dr(1)
            '          TextBox3.Text = dr(2)
            ' loading data into TextBoxes by column index
        End While

        dr.Close()
        cn.Close()
Sheldon LivingstonConsultantAuthor Commented:
What a goof... I left the underscore in front of "Data Source".
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.