[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 216
  • Last Modified:

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

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?

  • 3
1 Solution
> Is there any hope?

Not unless you have at least one datasource already defined on that server.  
dfinsAuthor Commented:
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?
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?
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'



Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now