1

Is it possible to connect to an MSSQL .MDF file in Coldfusion rather than an instance of SQL Server Express? (ie. similar to Access).

Edit #1

I realize that this isn't conventional and it would be for a particular dev environment.

Edit #2

Seems it's impossible: Java - connecting to a SQL Server database on Linux

Maybe I should simply convert the database to MySQL. I am using ORM which should render the site transparent to the backend I'm using in this dev environment.

Community
  • 1
  • 1
TechFanDan
  • 3,329
  • 6
  • 46
  • 89
  • Might be able to do that using JDBC driver datasource type, but Google has not been very forthcoming with a way to do so. – Scott Stroz Jul 31 '14 at 14:34
  • @ScottStroz Glad to know I wasn't the only one to have that issue :) – TechFanDan Jul 31 '14 at 14:36
  • @ScottStroz I did find examples using .Net, not quite sure how to translate them to mdf (or JDBC) – TechFanDan Jul 31 '14 at 14:51
  • 2
    You will definitely need the DB engine. Even with Access, you're still running a DB engine behind the scenes, it's just that the engine Access uses ships with Windows. – Adam Cameron Jul 31 '14 at 15:48
  • I've never used ORM, but the last sentence about the site working with any database engine sounds like an unsafe assumption. – Dan Bracuk Jul 31 '14 at 19:36
  • @DanBracuk I thought the idea of using an ORM (or Hibernate?) was to have that abstract layer that you could move from one DB engin to the other without any hassles? – TechFanDan Jul 31 '14 at 20:03
  • 1
    @TekiusFanatikus, you're right. Using an ORM is specifically intended to abstract the DB implementation away as much as feasible. They'rem not foolproof/perfect, and are limited by which DBs the ORM has connectors for. Hibernate will have one for most DBs though. Dan says some very "oblique" things at times, and they're not necessarily based on concrete knowledge or experience. But they're always pleasingly mysteriously worded. – Adam Cameron Jul 31 '14 at 21:33
  • What's the problem just using SQL Server Express, btw? (UPDATE: sorry, just saw your Linux reference. Presume you don't have a Windows box or VM to home it on). Are you sure you're asking the right question about the right part of your problem? – Adam Cameron Jul 31 '14 at 21:34
  • @AdamCameron I'm trying to complicate my life :) Essentially, I wanted to host a self contained dev environment at work through a Linux VM (other dev environment is on a VM (MS Server + SQL Server Express). However, I think if I simply install the tools on my workstation instead, I'll be up and running without any issues. Well, other than bloating my workstation install which should make IT happy :) – TechFanDan Aug 01 '14 at 12:08
  • 1
    OK, I'm gonna be cheeky and offer my first comment as an "answer" then. – Adam Cameron Aug 01 '14 at 12:09

1 Answers1

1

You will definitely need the DB engine. Even with Access, you're still running a DB engine behind the scenes, it's just that the engine Access uses ships with Windows.

You're going to have to run at least SQL Server Express if you want to interact with that DB.

Adam Cameron
  • 29,677
  • 4
  • 37
  • 78