Copy link to clipboard
Copied
Hi,
I understand that Visual FoxPro is deprecated. But is there a way to add VFP databasource as ODBC socket in CF9? We are moving from CF7 to CF9 and in CF7 we are able to create ODBC socket for VFP data source without any issues. But in CF9 the VFP DNS is not listed under ODBC DSN list of ODBC socket.
Server: Windows Server 2008 R2 64 bit
Coldfusion 9
I have installed Visual FoxPro ODBC driver version 6 on the server and have added the data source in system DSN. Please let me know if more info is needed.
Copy link to clipboard
Copied
This may be your issue: look in Windows services. Do you see the "ColdFusion 9 ODBC Agent" and "ColdFusion 9 ODBC Server" listed, after ColdFusion 9 Application Server? If not, the issue is that whoever installed CF9 chose NOT to enable ODBC support (it's an option asked during installation, even in CF2016).
If that's the issue, you have good news: You can add the code by running the following code, which adds the services to Windows:
<cfscript>
//change pw below to your CF Admin pw. If you MUST provide a username and password to login to the Admin, then swap the
//comments and use the second login statement, and if your username is other than "admin", change that in the 2nd argument
createObject("component","cfide.adminapi.administrator").login("adminpw");
//createObject("component","cfide.adminapi.administrator").login("adminpw","adminusername");
ds = createObject("component","cfide.adminapi.datasource");
writeOutput("Installing ODBC Services...<br>");
ds.installODBCservice();
writeOutput("ODBC Services installed");
</cfscript>
It immediately adds the services and enables them, and then see if you see the DSN when you refresh the CF Admin DSN page.
Note, though, that if your CF service is running as other than "Local System", this code above will not work, for a couple of reasons. You could stop CF, change it to run as local system, run the code, and then set it back to the original user CF was running as (just make sure you know that user's password before removing it!)
Let us know if this gets you going.
Copy link to clipboard
Copied
Hi,
ColdFusion 9 ODBC Agent and server already installed on the server. I created the DSN for Visual FoxPro in Microsoft dBase, Microsoft access dBASE driver, Microsoft dBase VFP driver and Microsoft Visual FoxPro driver, but coldfusion ODBC socket is not detecting these drivers. ODBC socket only lists the access, MySQL and MSSQL data sources added in the server. I'm not sure why
Copy link to clipboard
Copied
Is your Windows running 64-bit? If so, then it may depend on whether your CF9 is running as 32-bit or 64-bit Java. Rather than help you see how to confirm which is so, let’s try something simpler.
In 64-bit Windows, there are two Windows ODBC control panels, one that is 64-bit and one that is 32-bit. See that you have your ODBC DSN added in both, and then see if CF may show it. To get to them both just hit the “start” button in Windows (lower left) and type “odbc”. It should find both for you.
/charlie