Error "could not find installable ISAM"

A

Accessor

Hi all. I'm trying to use ADO with VBA in my database, and in setting up the
connection I get the error: "could not find installable ISAM." Here's my
connection string:

strConnection = "Provider=Microsoft.ACE.OLEDB.12.0;Data Souce=C:\Documents
and Settings\User\Desktop\BusinessActive\Estimator 9-28-09.accdb"

It's a bit frustrating since an almost identical connect string works in
excel vba for a different database. Any suggestions? I've combed the boards
for a couple hours now. Thanks in advance...

Kevin
 
D

Douglas J. Steele

See whether this works:

strConnection = "Provider=Microsoft.ACE.OLEDB.12.0;Data Souce=C:\Documents
and Settings\User\Desktop\BusinessActive\Estimator 9-28-09.accdb;Persist
Security Info=False;"
 
A

Accessor

Doug, thanks for your response. I haven't tried it yet. I've been working
with "currentproject.connection." Should I have mentioned that? (ADO
referenced the project from within itself?) Is there an advantage of one way
vs another? Thanks again for the help...
 
D

Douglas J. Steele

I'm afraid I don't understand what you mean when you say you're working with
currentproject.connection. It's not possible to reset the Connection
property of the CurrenrProject object.
 
A

Accessor

I think it's safe to say I'm the one that's confused here. :) I was following
an example out of a wrox book, line by line in my initial example. So you
wouldn't do that, set a connect string that way in a form class, to use ado
within that same database that way? I hope this clarifies a little. Here's
what another book has given me. Any light you can shed to flatten out the
learning curve, great. I'll be honest, I'm trying to figure out the benefits
of using ADO in the vba modules, vs just straight up vba to perform all
operations. Seems like extra coding to me.

Private Sub Form_Load()

Dim strConnection As String
Dim rsFreelanceRecord As ADODB.Recordset
Dim conn As ADODB.Connection

strConnection = CurrentProject.Connection

Set conn = New ADODB.Connection
conn.Open strConnection

End Sub
 
D

Douglas J. Steele

What you've currently got sets strConnection to whatever connection string
is appropriate to get to the tables associated with the CurrentProject. Are
you saying that strConnection = CurrentProject.Connection results in
strConnection being set to "Provider=Microsoft.ACE.OLEDB.12.0;Data
Souce=C:\Documents
and Settings\User\Desktop\BusinessActive\Estimator 9-28-09.accdb" (what you
originally posted), and that the code sample fails on the conn.Open
strConnection line? If not, then how does this code relate to your original
question?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top