ODBC error occurs while connecting to SQL server

I’m using Clarion 5 IDE. I’m trying to create a sample application with File driver as MSSQL & while running the application I’m getting the below error. Can anyone please let me know how to overcome this ODBC.dll error?
Attached the error screenshot also.

Error : ‘File (Sample3) could not be opened. Error: ODBC.dll could not be loaded(1). Press OK to end this application.’

Clarion 5 huh? You using Windows 95 too?

You haven’t really given enough info for anyone to be able to diagnose your problem. What you should do is set up a 32 bit ODBC data source (DSN) using the ODBC administrator. Then you should make sure you can get data from that DSN using Excel. Once you have that working, you should be able to use the same DSN as the owner name in your clarion dictionary and it should work. Only once you have got that working should you move onto anything more complicated.

it would need to be 32-bit Excel, correct?

I’ll give you a bit more information, which might help. The Clarion “ODBC driver” translates clarion commands, like PUT and GET and INSERT into commands that an ODBC layer/driver can deal with. That ODBC layer/driver will be specific to a particular database. For example, there is a file called psqlODBC.dll which is the layer for the postgres database. The Clarion MSSQL driver is just a modified ODBC version that still needs to talk to an MSSQL ODBC layer that will talk to the database.

The fact that your program is looking for “ODBC.DLL” suggests that it doesn’t have a clue what the actual DLL that it should use in order to connect to the database, is called. That is probably because you don’t have a 32 bit ODBC driver for MSSQL installed properly on the computer you are using as the client, but it could be something else.

So…if you can use ODBC in Excel to connect to your database, that’s a good indication that the Clarion ODBC layer has something it can connect to (your MSSQL ODBC driver) to talk to the database. If you can’t get things working from Excel, then Clarion won;t be able to, either. Using a named DSN you set up in the administrator is not the only way to manage a connection to the database, but it is the easiest for setting up a test.

Not sure. I think 64 bit Excel might use a 32 bit driver if there was no 64 bit one available. Certainly 32 bit Excel would be a better test.

Thanks @JonW I will create a DSN & will try that.