Disable Saving Connection in ADP

  • Thread starter Thread starter ZRexRider
  • Start date Start date
Z

ZRexRider

Hi,

I build a connection in my start up code. Access Data Projects save
the last used connection properties. I was wondering if anybody knows
of a way to avoid allowing Access to connect to the database prior to
my code running. This application gets distributed to other
workstations and I don't want it carrying any logon information.

Thanks
 
ZRexRider said:
I build a connection in my start up code. Access Data Projects save
the last used connection properties. I was wondering if anybody knows
of a way to avoid allowing Access to connect to the database prior to
my code running.

Call the CurrentProject.OpenConnection-Method without any
parameters. That will remove the stored connection settings.

Cheers
Phil
 
This seems to work thanks!

What I did with your tip was to include this in the Form.Unload event
of the main menu. What I would rather do is execute that line of code
when the application fires up. Unfortunately Access prompts for the
UserID/Pwd before my startup code runs and gets a chance to do
anything.


Sooo... I distribute the application with a "trusted connection" that
doesn't prompt for anything on startup, VBA code changes connection to
userid/pwd login with no prompting, exit app using your tip. No more
prompts! Thanks. (feels kinda wrong though)
 
ZRexRider said:
Hi,

I build a connection in my start up code. Access Data Projects save
the last used connection properties. I was wondering if anybody knows
of a way to avoid allowing Access to connect to the database prior to
my code running. This application gets distributed to other
workstations and I don't want it carrying any logon information.

Thanks

Answered elsewhere.
 
ZRexRider said:
Why do you bother!?

You asked exactly the same question in microsoft.public.access, and I fully
answered it there on 30th April. I can't help it if you are stupid enough to
post the same question in several places and then not bother to check them
all for replies. Idiot.
 
Sorry - I didn't realize that's what you were refering to. I posted on
the 27th here because I realized it would be a more appropriate place
for ADP questions. I got the answer here on the 28th so you can
probably guess I didn't go back to the other group 2 days later to see
if someone else responded.

Your response of "Answered elsewhere." sounded like a typical forum
"dis" by someone who thought I didn't do enough research before
posting. It wasn't clear.

Based on your recent response, I can't imagine someone like you
disrespecting a fellow delveloper. I got you wrong - sorry.
 
Back
Top