Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / SQL Server / ADP / February 2005

Tip: Looking for answers? Try searching our database.

Multi Database Access using ADP

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris Newman - 20 Feb 2005 18:01 GMT
Hi

I have created an ADP project that is a "generic" application that sits on
each users computer.  I have code in the ADP to change the connection string
so that the user can select different databases the ADP connects to.  (the
different DB's are strucurally identical).  The problem is if one of those
databases isnt available or the computer holding a particular database isnt
available, on running the ADP it says "<DB NAME> was not found on <server
name> etc..."  While this is quite correct, I dont want the message to come
up!

The user may not actualyl want to connect to the DB that is offline, so will
then select from a dropdown (from startup form) a different database to
connect to.

The message occuring as soon as the ADP is run AND it timesout searching for
the database.  I have tried saving "no connection string" into the ADP but
that didnt work - it still remebers!

Is there a workaround to prevent the message showing up?

Thanks

Chris Newman
Norman Yuan - 20 Feb 2005 19:46 GMT
You could make a small form as startup form and whenever your ADP app
starts, this form shows up and give a list of possible SQL Servers for user
to select. When user click "OK", you use
CurrentProject.OpenConnection()/CloseConnection() method to connect the ADP
app to the selected SQL Server. Of course you could do a bit more than
giving a list. You could code this form connects to a default Server when it
is loaded. If the default server is not available, you catch the timeout
error and either prompt user to select other server or automatically try to
connect next possible server... The key to this issue is to use
CurrentProject.OpenConnection() method.

> Hi
>
[quoted text clipped - 20 lines]
>
> Chris Newman
Chris Newman - 21 Feb 2005 01:18 GMT
I do use this - however, access attempts to connect as soon as the ADP is
opened in Access - even before any startup/autoexec stuff happens.

> You could make a small form as startup form and whenever your ADP app
> starts, this form shows up and give a list of possible SQL Servers for
[quoted text clipped - 44 lines]
>>
>> Chris Newman
Adam Bunter - 21 Feb 2005 21:29 GMT
I open an About Form when the application starts which calls all of my
startup routines (menus, options etc). After three seconds its visible
property is set to false and it opens a custom login form. The user
then selects the connection they want. In the unload event of the
About Form I set the  CurrentProject.OpenConnection "Provider=" (along
with cycling through and closing any open objects) which causes the
adp to become disconnected, so next time its started there is no
connection prompt.

This works well, except when the application terminates abnormally, in
which case the user is prompted the next time it is restarted (I
advise the user to press cancel and ignore the prompt).

It would be nice if there were an easier way of starting an adp in a
disconnected state.

> I do use this - however, access attempts to connect as soon as the ADP is
> opened in Access - even before any startup/autoexec stuff happens.
[quoted text clipped - 47 lines]
> >>
> >> Chris Newman
Chris Newman - 21 Feb 2005 22:09 GMT
Thanks for the tip Adam.  I might give that a go and see if I can persude
Access to behave for 5 minutes!

Chris

>I open an About Form when the application starts which calls all of my
> startup routines (menus, options etc). After three seconds its visible
[quoted text clipped - 71 lines]
>> >>
>> >> Chris Newman
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.