How do I create a query from MS Access in Cold Fusion 8?

Posted on 2010-01-08
Last Modified: 2013-12-16
Hey guys,
     I'm trying to create a query in a Cold Fusion webpage. I'm hosting the data in an MS Access DB. Unfortunately, it appears as though creating a local dynamic connection to the database is no longer supported in any version of Cold Fusion over 5.0.

Can anyone tell me how I can "update" this query to conform to a more Cold Fusion 8 standard???

<cfquery name="getQuote"
  dbtype = "dynamic"
  connectstring="DRIVER=Microsoft Access Driver (*.mdb);
  FIL=MS Access;MaxBufferSize=2048;PageTimeout=5">
  SELECT * FROM tblQuotes

Note, I do not have access to update the ODBCs or DataSources or anything like that. I can simply update the pages, and drop an Access file in the folder. Is there any hope?

Question by:dfins
    LVL 51

    Expert Comment

    > Is there any hope?

    Not unless you have at least one datasource already defined on that server.  
    LVL 1

    Author Comment

    I do have datasources defined on that server, but they don't have anything to do with the database that I'm trying to connect to. Does that matter?
    LVL 51

    Expert Comment

    It depends.  The best option (speed, etc..) is obviously to have someone create a datasource for you on that machine. Failing that, you _might_ be able to connect to access VIA another compatible datasource.  What datasource types do you have setup already:  MS Access, MS SQL, etc?
    LVL 51

    Accepted Solution

    If you have at least one MS Access datasource defined, you can try using the external db syntax. I don't really use MS Access. So not tested but the syntax is usually _something_ like the query below. But as I mentioned, this is really not the best option. It is slower than a regular query, and may not work with mapped drives.

    SELECT ... FROM SomeTableName IN 'c:\pathto\yourDatabase.mdb'


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
    Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
    The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. This will be demonstrated using a Windows 8 PC Go to your WordPress login page. This will look like the following: :…
    The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now