Tip of the day: Connect to MS SQL Server from Mac without ODBC setup
- you get the freetds library, e.g. precompiled from our website
- you start a SQL Connection
you set the OptionLibraryODBC with the file path to the library.- you use an ODBC connecting string like "DRIVER={
FREETDS" + pathToLib + "};Server=192.168.2.32;UId=SA;PWD=manager;Database=test;TDS_VERSION=7.2;Port=1433".
Update for Xojo:
If you want to place the libtdsodbc.dylib into the Apps Resources Folder (Mac) within the Bundle, add a Build Step to copy the File (Build & Debug Mode) to the Resources Folder and use the following code to access it:
dim libtdsodbc as FolderItem
libtdsodbc = App.ExecutableFile.Parent.Parent.Child("Resources").Child("libtdsodbc.dylib")