Trying to create code to open an ODBC DB on my Windows 10 PC using MS Visual Studio 2019. Have found a bunch of sample code that is suppose to open an ODBC connection to a DB and run a simple query. But none of the samples I've found will compile without errors. Some are ten years old, so I expect things have changed, but something two years old should be working, right?
If you know of some sample code that is recent, please let me know.
I was very surprised that the sample code on Microsoft's web site also gave a lot of compiler errors.
Note that I only do command line compiling, and I have the build string listed at top for both. But if you are using the IDE you'll need to do whatever it takes to tall the thing to add ODBC32.lib to the link options.