FoxPro Programming
Connecting to Azure SQL Database through ODBC DSN on a 32 bit application
Gravatar is a globally recognized avatar based on your email address. Connecting to Azure SQL Database through ODBC DSN on a 32 bit application
  Luis
  All
  Feb 1, 2023 @ 09:16am

Hello Everyone, this might be long. I have an old, and fairly large, Visual FoxPro application that uses an on premise SQL Server as the backend. The application uses remote views that rely on ODBC DSN connections. I moved the database to Azure and it worked well for a while...until the demise of ADAL last December. I can create 64 bit ODBC DSN connections but 32 bit, which is what FoxPro can use, fail to connect. Other than recreating the application in another language, have anyone found a workaround for this?

Gravatar is a globally recognized avatar based on your email address. re: Connecting to Azure SQL Database through ODBC DSN on a 32 bit application
  Luis
  Carlos Yohn
  Feb 1, 2023 @ 11:16am

Thanks Carlos, that's correct, FoxPro cannot use MSAL. So what is the correct path to keep this type of applications running, besides re-writing them in another language?

Gravatar is a globally recognized avatar based on your email address. re: Connecting to Azure SQL Database through ODBC DSN on a 32 bit application
  Rick Strahl
  Luis
  Feb 1, 2023 @ 08:08pm

Can't you use the standard SQL driver for Azure? It'll work with just about everything except some of the Azure specific types and newer SQL Server features.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Connecting to Azure SQL Database through ODBC DSN on a 32 bit application
  Luis
  Rick Strahl
  Feb 2, 2023 @ 09:05am

Thanks Rick, I'm trying to avoid the user having to enter their user name and password, this system has dozens of apps, each app with its own remote view, since they have private data session each time they open a new app I'm afraid they will have to enter again their credentials, for now I'm Ok since we are running an on-premises server and I'm using 'Windows authentication" to connect to it, I'm just trying to not get caught without options in the future.

Gravatar is a globally recognized avatar based on your email address. re: Connecting to Azure SQL Database through ODBC DSN on a 32 bit application
  Rick Strahl
  Luis
  Feb 3, 2023 @ 04:22pm

Not sure what you're saying. You provide a connection string with credentials, or token from Azure I believe. I haven't done this in a long while but when I tried this it works.

I can't speak to Windows or Azure AD auth, but I doubt that would work with off Azure clients either way. If you're offline you need to use connection strings with credentials or security tokens.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Connecting to Azure SQL Database through ODBC DSN on a 32 bit application
  Laveryan
  Luis
  Feb 8, 2024 @ 07:12am

Just to add, you might also try using a bridge or proxy that can communicate with your 32-bit application while running in 64-bit mode. This device is supposed to handle data transfer and authentication between your FoxPro application and Azure SQL Database. To be honest, it's not a perfect solution, but it should work and could make your current configuration compatible with Azure's processes. This post about integrating the Tec Doc Auto Parts Database is another resource you should look into. It may contain some insights that you find useful as well, in my opinion. Okay, I hope this was helpful. Salutations.

© 1996-2024