Before I dig too far into this… I have downloaded Microsoft’s MSSQL ODBC drivers for OSX and attempted to connect to a sqlexpress instance using ODBCDatabase. It failed miserably with an error code of “1” and no error message. I played with different DSN settings but no luck.
Is it even possible to connect to SQL Server this way? I’ve done a lot of reading of TOF but couldn’t really find a definite answer. Seems to me that you have to use freetds and MBS to do this.
This is a personal project so not interested in buying anything to make it work. I’m using 2020R1.1
I have resorted to using MBS DB plugin and can report that yes you CAN successfully connect to MS SQL that way using ODBC
I can dig out some code
I was able to connect from my mac using python with the same drivers but still no joy from Xojo. So, my guess is that ODBCDatabase is broken, at least for MSSQL.
I never got it to work either so I use MBS
This is just a personal project so I don’t want to spend the money for the MBS SQL plugin. I don’t think that’s included with the regular MBS license, which I have.
Oh well… I’ll just go back to my original plan of using Postgres. I am slowly becoming an MSSQL DBA at my day job and just thought it would be good to use that for more experience.
I thought about writing an interface between MSSQL and Xojo using python since that does work but I really don’t want to take the time for that right now. Still might do it, just for fun, sometime.