Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

file dsn 1

Status
Not open for further replies.

belovedcej

Programmer
Nov 16, 2005
358
US
I created a file dsn looking up to SQLServer. I used that dsn to create linked tables in an Access db.

I then deleted the file dsn (long story - basically, testing everything I can think of.)

Why can I still read the linked tables? If I delete a machine datasource the tables that used it for linking no longer work.

I'm very confused. Is the connection string being hidden somewhere in Access?
 
Is the connection string being hidden somewhere in Access
Yes, in the Connect property of the DAO.TableDef object.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Ok - this is a very educational moment for me. thanks! :)

I looked at the msysobjects table to see the string, and I'm noticing that when I connect to a machine datasource it looks different than on a file dsn. There's too much I don't understand, but apparently, the machine DSN actually requires the settings on the local computer, whereas the file one does not.

So here's the most important question, I guess - lets say I create my db using a file dsn. Can I distribute it with just the DB, and not the dsn? It would be great if I could just send a single file and be done with it.

Thanks for your fast and informative response.
 
OK - I'm looking at these more closely and I see a possible problem with File dsn.

The issue is this:
We distribute this application in several locations. Not all of them name their server the same thing. The database is named the same, but the server may be different (or may even be accessed by IP address.)

In the past I have gone to every computer and created a machine dsn with the name of their server in it. Access then was able to look at the right place because I always named the DSN the same thing.

But with the file dsn, even if I create a new one on each computer as before, since it apparently doesn't really go look at the dsn file before connecting, will everything break because my server name is in the string?

Does this make sense?

We were looking at file dsns because it would be easier for the users to install a file we sent to them than for them to set up the machine source. But now I'm wondering if there would be additional issues with that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top