
28-Jul-2006, 08:18 AM
|  | Guest | | | | | | | | | | Do I have the right DSN for a linked table? Here's the situation (Access 2002). Many of my agency's applications use
linked tables (to SQL tables). Is there a way that I can "test" to see, table
by table, whether or not a user has the correct DSN/ODBC connection(s) to
access the table(s)?
What I want to do is spin through each table, checking to see if it's
accessible. If not, I want to generate a MsgBox, saying something like:
"You do not currently have the correct DSN setup for table 'myTable'. Please
contact the Helpdesk for assistance."
I'd rather do that than have to trap an error in a critical routine
somewhere else in the application. I can run this module right at startup, Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/11060-do-i-have-right-dsn-linked.htmlReference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11060
and let a (new?) user know that they need something setup before they can run
the application.
Any ideas would be MOST appreciated.
Thanks!!
Do share your immediate thoughts or reactions on this issue? We value your views! Login Now! or Sign Up Today! to share your views with us.. Gurfateh! | 
28-Jul-2006, 08:18 AM
|  | Guest | | | | | | | | | | Re: Do I have the right DSN for a linked table? Look at the Connect property of the table. The DSN name will be contained as
part of it.
--
Doug Steele, Microsoft Access MVP http://I.Am/DougSteele
(no e-mails, please!)
"Dennis" wrote in message
news:C3A71FE4-1E92-477C-BB73-9905C47CE01F@microsoft.com...
> Here's the situation (Access 2002). Many of my agency's applications use
> linked tables (to SQL tables). Is there a way that I can "test" to see, Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11060
table
> by table, whether or not a user has the correct DSN/ODBC connection(s) to Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11060
> access the table(s)?
>
> What I want to do is spin through each table, checking to see if it's
> accessible. If not, I want to generate a MsgBox, saying something like:
>
> "You do not currently have the correct DSN setup for table 'myTable'.
Please
> contact the Helpdesk for assistance."
>
> I'd rather do that than have to trap an error in a critical routine
> somewhere else in the application. I can run this module right at startup,
> and let a (new?) user know that they need something setup before they can
run
> the application.
>
> Any ideas would be MOST appreciated.
>
> Thanks!! | 
28-Jul-2006, 08:18 AM
|  | Guest | | | | | | | | | | Re: Do I have the right DSN for a linked table? Okay. But how do I *use* that? I understand that I can view the DSN name, but
how do I check to see if the user has that one defined on his PC?
"Douglas J Steele" wrote:
> Look at the Connect property of the table. The DSN name will be contained as
> part of it.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
> "Dennis" wrote in message
> news:C3A71FE4-1E92-477C-BB73-9905C47CE01F@microsoft.com...
> > Here's the situation (Access 2002). Many of my agency's applications use
> > linked tables (to SQL tables). Is there a way that I can "test" to see,
> table Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11060
> > by table, whether or not a user has the correct DSN/ODBC connection(s) to
> > access the table(s)?
> >
> > What I want to do is spin through each table, checking to see if it's
> > accessible. If not, I want to generate a MsgBox, saying something like:
> >
> > "You do not currently have the correct DSN setup for table 'myTable'.
> Please
> > contact the Helpdesk for assistance."
> >
> > I'd rather do that than have to trap an error in a critical routine
> > somewhere else in the application. I can run this module right at startup,
> > and let a (new?) user know that they need something setup before they can
> run Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11060
> > the application.
> >
> > Any ideas would be MOST appreciated.
> >
> > Thanks!!
>
>
> | 
28-Jul-2006, 08:18 AM
|  | Guest | | | | | | | | | | Re: Do I have the right DSN for a linked table? Sorry, I thought you were wanting to check that they were linked using the
correct DSN.
DSN information is simply stored in the registry.
User DSNs are under HKCU\Software\ODBC, System DSNs are under
HKLM\Software\ODBC
Grab code that can read the registry (like, for instance, http://www.mvps.org/access/api/api0015.htm at "The Access Web") and check
whether the necessary key(s) exist.
--
Doug Steele, Microsoft Access MVP http://I.Am/DougSteele
(no e-mails, please!)
"Dennis" wrote in message
news:337C8E5A-75B7-4AA8-B1FB-2C05488734E6@microsoft.com...
> Okay. But how do I *use* that? I understand that I can view the DSN name,
but
> how do I check to see if the user has that one defined on his PC?
>
> "Douglas J Steele" wrote:
>
> > Look at the Connect property of the table. The DSN name will be
contained as
> > part of it.
> >
> > --
> > Doug Steele, Microsoft Access MVP
> > http://I.Am/DougSteele
> > (no e-mails, please!)
> >
> >
> > "Dennis" wrote in message Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11060
> > news:C3A71FE4-1E92-477C-BB73-9905C47CE01F@microsoft.com...
> > > Here's the situation (Access 2002). Many of my agency's applications
use
> > > linked tables (to SQL tables). Is there a way that I can "test" to
see, Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11060
> > table
> > > by table, whether or not a user has the correct DSN/ODBC connection(s)
to
> > > access the table(s)?
> > >
> > > What I want to do is spin through each table, checking to see if it's
> > > accessible. If not, I want to generate a MsgBox, saying something
like:
> > >
> > > "You do not currently have the correct DSN setup for table 'myTable'.
> > Please
> > > contact the Helpdesk for assistance."
> > >
> > > I'd rather do that than have to trap an error in a critical routine
> > > somewhere else in the application. I can run this module right at
startup,
> > > and let a (new?) user know that they need something setup before they
can
> > run
> > > the application.
> > >
> > > Any ideas would be MOST appreciated.
> > >
> > > Thanks!!
> >
> >
> > | 
28-Jul-2006, 08:18 AM
|  | Guest | | | | | | | | | | Re: Do I have the right DSN for a linked table? I'll look into this. Thanks for the info!
"Douglas J Steele" wrote:
> Sorry, I thought you were wanting to check that they were linked using the
> correct DSN.
>
> DSN information is simply stored in the registry.
>
> User DSNs are under HKCU\Software\ODBC, System DSNs are under
> HKLM\Software\ODBC
>
> Grab code that can read the registry (like, for instance,
> http://www.mvps.org/access/api/api0015.htm at "The Access Web") and check
> whether the necessary key(s) exist.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
> "Dennis" wrote in message
> news:337C8E5A-75B7-4AA8-B1FB-2C05488734E6@microsoft.com...
> > Okay. But how do I *use* that? I understand that I can view the DSN name,
> but
> > how do I check to see if the user has that one defined on his PC?
> >
> > "Douglas J Steele" wrote:
> >
> > > Look at the Connect property of the table. The DSN name will be
> contained as
> > > part of it.
> > >
> > > --
> > > Doug Steele, Microsoft Access MVP
> > > http://I.Am/DougSteele
> > > (no e-mails, please!)
> > >
> > >
> > > "Dennis" wrote in message
> > > news:C3A71FE4-1E92-477C-BB73-9905C47CE01F@microsoft.com...
> > > > Here's the situation (Access 2002). Many of my agency's applications
> use
> > > > linked tables (to SQL tables). Is there a way that I can "test" to
> see,
> > > table
> > > > by table, whether or not a user has the correct DSN/ODBC connection(s) Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11060
> to
> > > > access the table(s)?
> > > >
> > > > What I want to do is spin through each table, checking to see if it's
> > > > accessible. If not, I want to generate a MsgBox, saying something
> like: Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11060
> > > >
> > > > "You do not currently have the correct DSN setup for table 'myTable'.
> > > Please
> > > > contact the Helpdesk for assistance."
> > > >
> > > > I'd rather do that than have to trap an error in a critical routine
> > > > somewhere else in the application. I can run this module right at
> startup,
> > > > and let a (new?) user know that they need something setup before they
> can
> > > run
> > > > the application.
> > > >
> > > > Any ideas would be MOST appreciated.
> > > >
> > > > Thanks!!
> > >
> > >
> > >
>
>
> | 
Support Us! Become a Promoter! | | Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh! | (View-All)
Members who have read this thread : 0
| | There are no names to display. | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Tools | Search | | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is On | | | | » Gurbani Jukebox | Listen to Gurbani while surfing SPN! | » Recent Discussions | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | » Books You Should Read... | | | |