View Single Post
  #5 (permalink)  
Old 28-Jul-2006, 08:18 AM
Dennis's Avatar Dennis
Guest
 
Posts: n/a
   
   
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?
> >
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/11060-do-i-have-right-dsn-linked.html
> > "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)

> 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!!
> > >
> > >
> > >

Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11060
>
>
>

Reply With Quote
 
Page generated in 0.16596 seconds with 24 queries