Excel to Access 2007 Connection String

What is the correct connection string for downloading information from a split Access 2007 database (on a network) into Excel 2007 when the users computer does not have Access installed?  I need Excel to download information from this database on a regular basis.  The code (See below) worked perfectly on every computer before I split the database...now it only works on computers that have Access installed.  Computer that do not have access installed show the error "Run-time error '-2147467259 (80004005)':  Could not find installable ISAM."  I have looked at both the registry and the code, and can't seem to correct the issue.  Any and all ideas are welcome
Const strConnectionString As String = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" & _
        strDatabaseLocation & ";Jet OLEDB:Database Password=" & Password


    Dim Connection As ADODB.Connection
    Dim RecordSet As ADODB.RecordSet
    
    Set Connection = New ADODB.Connection
    Set RecordSet = New ADODB.RecordSet
     
    Connection.Open strConnectionString
    RecordSet.Open strSql, Connection, adOpenStatic, adLockOptimistic
     
    rngTargetSheet.Activate
    rngTargetSheet.Name = strSheetName
    rngTargetRange.CopyFromRecordset RecordSet
    
    Set Connection = Nothing
    Set RecordSet = Nothing

Open in new window

Error-Message.bmp
uwlchemistAsked:
Who is Participating?
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.

jkpieterseCommented:
I think this should work:

"Provider=Microsoft.Jet.OLEDB.4.0; Data Source="  & DBFullName & ";"
0

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
jkpieterseCommented:
Of course you need to update that so it uses the variable names you have.
0
uwlchemistAuthor Commented:
I am afraid that the connection failed at the following location

Connection.Open strConnectionString

It gave me a general error this time.  The original problem fails at the following step.

RecordSet.Open strSql, Connection, adOpenStatic, adLockOptimistic

Any other ideas?
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

jkpieterseCommented:
OK, let's step back a bit.

You should be able to connect to an mdb file using msQuery, even on a system that has no Access.

So if you could go to a user machine without Access, set up a direct query to the database (Data, get external data, new database query) then you can use a bit of VBA to get the connection (Once the data is returned, just type :

?ActiveCell.QueryTable.Connection

in the immediate window of the VBE and hot enter)
0
uwlchemistAuthor Commented:
Sorry it took so long to get back with this.  The solution to the problem was as simple as the error was silly.  When I split the database, obviously, all of the tables went to the back end, with links to them in the front end.  Computers that have Access installed can "see" these linked tables and so therefore nothing is different.  However, computers without Access installed do not appear "see" these linked tables, and so the code fails when Excel attempts to query a table.  The solution is to query the queries...as I really should have been doing all along but I got sloppy.  As fate would have it the very first connection attempt was to a table, and so I believed my connection string to be bad.  When I commented out the connection for the table query, the code work perfectly.  Thank you for pointing me in the right direction!
0
uwlchemistAuthor Commented:
This post got me pointed int he right direction.
0
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
Microsoft Access

From novice to tech pro — start learning today.