actually CONNECTSTRING is no longer supported in CFMX.
Main Topics
Browse All TopicsI'm trying to query a .dbf file (what kind I dont know), using Coldfusion. I read that this would be the command for a dynamic connection:
<CFQUERY NAME="qContact"
DBTYPE="dynamic"
CONNECTSTRING="Driver={Mic
SELECT *
</CFQUERY>
But that doesn't work, I get this error:
The tag does not have an attribute called CONNECTSTRING. The valid attribute(s) are name, datasource, dbtype, sql, username, password, maxrows, blockfactor, timeout, cachedafter, cachedwithin, debug.
I have set up ODBC on the server so I could use that or this dynamic way, whichever works. Any ideas?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi, sorry I'm just responding, my email wasn't working. I have no reason to use DSNless connection. The problem is I couldnt find out how to do it the normal way. I think the problem may be the dbf file now that I have gotten a little further. I set up ODBC System DSN to connect via FoxPro driver to the folder where the dbf file is. Then my query is like this:
<cfquery name="qContact" datasource="DSN">
SELECT *
FROM dbf_file
</cfquery>
I think thats the way to do it, because dbf's dont have table names, so the FROM is the actual file name. I'm not sure of this however, because the query errors out saying:
[MERANT][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Visual FoxPro Driver]Not a table
I've also tried ODBC connecting to Microsoft dbase file and get same problem. I am able to open the dbf file in a dbf viewer and everything looks fine.
How did you setup your DSN? Have you tried different drivers rather than just the Merant one?
Did you set it up as a free table directory? Does the directory have all hte files?
you named the DSN = 'DSN'
A simple solution would be to import the dbf file into Access :-)
I have seen many people import to access than deal with Fox Pro dbf files.
CJ
OK I have tried many other dbf files from the same program and they all connect and query fine in CF. So i'm assuming i have it all set up right, but that the main dbf I want is just too big. This program is our main accounting app so needs to stay in dbf. I tried importing into Access and SQL and both said it was too many fields. I can, however connect to it with Corel Paradox without that error. So is there a setting in CF regarding table size or timeout?
I meant a file with not records in it. BUT I have solved the problem. Like you said, it was a driver issue. There's a few different dbf drivers and this one happened to be Microsoft dbase version III. I opened the dbf with a different app and it said exactly what it was. It opens fine now! So it was the ODBC all along. Thanks for your help!
Business Accounts
Answer for Membership
by: cheekycjPosted on 2003-08-05 at 15:42:26ID: 9084542
are you using ColdFusion 5.0? This tag is supported in CF 5.0 and later.
CJ