Adding to the ConnectionString - HOW ?

K

Koorosh

Hi everyone

I am trying to append a string to my access project's connection string.

CurrentProject.Connection.ConnectionString=
CurrentProject.Connection.ConnectionString & "Jet OLEDB:System
database=C:\workgroupInfo.mdw;"

I keep getting an error message saying: can't do this while the object is
open. I then add code to close the project's connection before appending to
its connectionstring. I still get an error message saying that the close
operation failed.

What gives?

Where in the project, and how do I append to the CurrentProject.Connection's
connectionstring?
 
D

Douglas J. Steele

AFAIK, the only way is to use a shortcut that provides the necessary
information. Once you've opened the database, it's too late.
 
K

Koorosh

Could you elaborate please? Thanks


Douglas J. Steele said:
AFAIK, the only way is to use a shortcut that provides the necessary
information. Once you've opened the database, it's too late.
 

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