• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 219
  • 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);
  DBQ=Database\C21_Extra.mdb;DriverId=281;
  FIL=MS Access;MaxBufferSize=2048;PageTimeout=5">
  SELECT * FROM tblQuotes
</cfquery>

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?

Thanks!!!
0
dfins
Asked:
dfins
  • 3
1 Solution
 
_agx_Commented:
> Is there any hope?

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

<cfquery...>
SELECT ... FROM SomeTableName IN 'c:\pathto\yourDatabase.mdb'
</cfquery>

http://blogs.msdn.com/access/archive/2009/03/27/accessing-external-data-using-the-in-clause.aspx
http://office.microsoft.com/en-us/access/HA012314841033.aspx

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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