Copy link to clipboard
Copied
Can two unique datasource names point to the same MS Access Database?
Copy link to clipboard
Copied
What happened when you tried?
Copy link to clipboard
Copied
I didn't try yet because I wanted to double check to see if it was even possible.
Copy link to clipboard
Copied
The idea of two Access databases makes me feel quite ill.
I don't see why it wouldn't work, but seeing the number of issues people have with Access these days I'd say there's no way of knowing other than trying it.
Out of interest, why?
Copy link to clipboard
Copied
I got handed a directory of files to set up two coldfusion sites on a new server. What I have is two websites which both have a gallery page with identical contents, see Jembetat.com and SaharaAfricanGallery.com. In the the files I got in the Jembetat directory I have a single database "jembetat.mdb", in SahraAfricanGallery directory I have two databases "jembet.mdb" and "sahara.mdb" The Jembetat site refers to a dsn titled "Jembetat_accesscf_jembetat" pointing to the "jembetat.mdb" and the sahara site to a dsn titled "sahara20049216_accesscf_jembetat". Interestingly enough I believe all three databases are identical. Currently I am pointing the jembetat dsn to the jembetat database in the sahara directory and the sahara dsn to the sahara database in the sahara directory. In my mind however if the client makes a change on one website then he would have to manually change it on the other unless I point poth dsn to the same directory.
Copy link to clipboard
Copied
Oh my God, *two* galleries running from Access?!
I would strongly urge you to migrate the data to a proper database engine, you'll have nothing but driver trouble and locking issues if you use Access.
Why do you need two DSNs to the same database? Why not have two sites each referencing the same two (different) DSNs?
Copy link to clipboard
Copied
I know its crazy but I did not build this site. Iike the idea of just batch changing the dsn name in the sahara site to the same dsn used by the other site. Then they are just using one dsn and pointing to one database.
Copy link to clipboard
Copied
I didn't try yet because I wanted to double check to see if it was even possible.
Surely it'd be faster to spend the 5min it would take to set the DSNs up and test them, than ask here?
You might get an issue with file locking, but that's a guess.
Why are you using even one Access DSN, let along wanting to use two?!
Access is a desktop application; it's not intended to be used server-side. Using Access for a server-side DB is like using Word macros as an application server.
--
Adam
Copy link to clipboard
Copied
Can two unique datasource names point to the same MS Access Database?
Yes. You can create as many datasource names for any individual database supported by CF. And there are some valid reasons for doing this. For example, you might want to have one datasource with permission to change data, and the other without.
Like everyone else here, I'd recommend that you migrate from Access to ... anything else.
Dave Watts, CTO, Fig Leaf Software
Copy link to clipboard
Copied
You know it is bad when even Microsoft advises against using Access in such a scenario: