Skip to main content
May 5, 2010
Question

Access a local MDB database without using Coldfusion Administrator? (Programatically)

  • May 5, 2010
  • 3 replies
  • 1193 views

My client has nothing but FTP access to her web server.  She does not have access to the Coldfusion Administrator.  Her MDB database file sits in the webroot of her assigned public_html folder. Is there any way to programatically establish a connection to her MDB database?  Please help!

Ben

This topic has been closed for replies.

3 replies

May 5, 2010

We aren't actually dealing with a corporate hosting center, but a University data center.  I am trying to take the approach of contacting somebody, but it has been a difficult one so far, which is why I am posting this here...You're definitly right about that public access security issue though, I think I am going to push them to move it in the directory under if possible

Inspiring
May 5, 2010

I sure hope the web server is set to not serve up MDB files, otherwise she's leaving her data a bit exposed, having it in a browseable directory!

You can use the CF service factory to create a datasource, or failing that, the CFAdmin API.  However if you've only got FTP access, I imagine they have blocked access to both the service factory and the API.

BTW, what sort of hosting provider doesn't give one access to create a datasource?!  At least via some mechanism (like calling them up and asking them to do it).

--

Adam

ilssac
Inspiring
May 5, 2010

I'm not sure what you are trying to solve.

The client wouldn't necessarily need access to the Administrator to work with an Access MDB database.  Once a connection is made to an MDB file through the administrator -- downloading, uploading and minuplating the MDB file will not invalidate that DSN connection.  As long as the MDF file is always put into the same place in the file system with the same file properties..  You may have to deal with file locking issues and other challanges because Access is not an enterprise database, but the DSN shouldn't be part of these difficulties.

If that does not solve the problem you are trying to solve.  Then maybe you need to look that the Administrator API that is available in the recent versions of ColdFusion.  The API allows for programmatic control of many of the Administrator Settings, such as DSNs.  There is an entire section on the API in the documentation: http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=basiconfig_37.html.