Wiring Up A 32 Bit ODBC DSN With 64 Bit CF 9
Posted By : todd sharp Posted At : April 7, 2011 8:06 PM Posted In: ColdFusion
16
Quite a long title, but there's simply no easy way to simply describe what I'm about to cover in this post. To give a bit of back story - the project I'm getting started on requires that I hook CF to a FoxPro Database. This comes with all kinds of headaches as there is no (free) JDBC drivers out in the wild that I could find so I had to go the good ole ODBC Socket route.
The first step was to get a hold of the proper drivers for FoxPro. At the time of this blog post I found them here - who knows who long that link will stay alive in Microsoft land - but I digress. The trick here, as you'd soon find if you scamper off to create a new ODBC DSN on 64 bit Windows is that you'll have to use the 32 bit ODBC Admin interface. I found mine in the following location:
Within the 32 bit ODBC Admin you can create a new DSN and point it at the appropriate FoxPro DB. The next step is to head to the CF administrator and wire up a CF DSN to the ODBC DSN. Create a new datasource and select 'ODBC Socket' as the type. On the following screen you may notice that the ODBC DSN you just created in Windows is not shown in the drop down. Here's where it gets a bit dirty. Inspect the <select> element in your favorite console (I used Chrome dev tools) and add the dsn as an option yourself making sure to use the same name from the Windows admin (add it as both the value and the text for the option). Now enter your username and password and save. Your datasource should verify and you're free to use it from <cfquery> as you would any other CF DSN.
Yeah, it's dirty and cheap and it might have some ugly consequences, but it works and is the only way I could find to hook up a 64 bit install of CF to a FoxPro DB. Feel free to comment if you know of a better way.
Side Note: Lest anyone think I have anything against paid software I should mention that this particular project is for the church where my brother is a pastor so the funds are limited and a $500 driver was a bit out of budget for the particular project.

Right now all functionality is of a read only nature and is only accessing copies of the files that we update/refresh after hours, so it's not realtime.
I'm not sure what version it is really. I haven't gone much further then wiring it up and testing that a simple select worked as expected. The data I'm working with will be completely read only (no writes/deletes) so I'm not sure what to tell you. From what I've read FoxPro does not support transactions so read/writes are blocking.
Error accessing available odbc datasources. - Cannot open HKEY_LOCAL_MACHINESOFTWAREODBCODBC.INIODBC Data Sources: Windows error 2 occurred.The system cannot find the file specified.
Any ideas?
Connection verification failed for data source: merlinFoxPro
java.sql.SQLException: [Macromedia][SequeLink JDBC Driver][ODBC Socket]internal error: The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr).
The root cause was that: java.sql.SQLException: [Macromedia][SequeLink JDBC Driver][ODBC Socket]internal error: The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr).
Any ideas? Thanks
http://www.monstersbeatsbydre.org/ monster beats
http://www.monstersbeatsbydre.org/ beats by monster
http://www.monstersbeatsbydre.org/ monster beats by dre
http://www.monstersbeatsbydre.org/ monster headphone
to download real estate listings. This worked like a charm on Windows 2008 R2 with ColdFusion 9.
Thanks Todd!
http://www.abercrombieoutletonlines.org/ abercrombie & fitch outlet
http://www.abercrombieoutletonlines.org/ abercrombie and fitch outlet
http://www.abercrombieoutletonlines.org/ abercrombie outlet
http://www.cardinalsfansshop.com Darnell Dockett Jerseys
http://www.jetsfansshop.com New York Jerseys
newest monster beats headphones
lady gaga headphones