@Emile Schwarz The Microsoft ODBC driver is used by c++/c# apps running on linux/mac to access mssql databases, which is something xojo is not currently able to. Microsoft has moved that package into stable not that long ago but enough to warrant investigation IMHO
[quote=417526:@Emile Schwarz]I am unsure of what to understand
So, Xojo ODBC Plugin is not able to deal with mssql databases ?[/quote]
MSSQL databases can be used by xojo ONLY ON WINDOWS, mac and linux require postgres or oracle. Until a few years back there was no option to use MSSQL on linux and no options to connect a linux/mac software to mssql beside java or paid for drivers. Microsoft has released both a mssql build for linux and drivers for linux(compatible with brew to be ran on mac) so there shouldn’t be any blockers for support.
Last time i attempted to use mssql on mac(and the Microsoft driver wasn’t yet stable) that plugin was an empty placeholder that didn’t do anything. It was just to make sure cross platform build didn’t crash due to the missing file.
But, ODBC can talk to MS SQL as well as other types of databases.
I have been using the ODBCPlugin for many years (circa 2007) to talk through a DSN / ODBC connection for MS SQL Server, successfully talking to SQL Server 2005 and above. So, I don’t know what you mean by “not stable”.
The essential Code looks like this (not my current code, but what i started with using @Christian Schmitz examples):
[code]// WaWi_DB_MBS is a SQLDatabaseMBS
#If TargetWindows Then
WaWi_DB_MBS.Option(“UseAPI”) = “OLEDB”
WaWi_DB_MBS.Option(“SQLNCLI10.LIBS”) = “sqlsrv32.dll” // Library included in Windows Vista and newer
WaWi_DB_MBS.UserName = WaWi_Login
WaWi_DB_MBS.Password = WaWi_Password
WaWiConnection.ConnectMT(WaWi_ServersAddress + “@SL_DATABASE_NAME”, WaWi_Login, WaWi_Password, SQLConnectionMBS.kSQLServerClient) // PcName\SqlServerInstanceName@DatabaseName
#ElseIf TargetMacOS
dim libtdsodbc as FolderItem
libtdsodbc = App.ExecutableFile.Parent.Parent.Child(“Resources”).Child(“libtdsodbc.dylib”) // A copy into Resources Step in the Build Settings
Dim s As New SoftDeclareMBS
Call s.LoadLibrary(libtdsodbc.NativePath)
Dim cs As String = “Driver={FREETDS};Server=” + WaWi_ServersAddress + “;UId=” + WaWi_Login + “;PWD=” + WaWi_Password + “;Database= SL_DATABASE_NAME;TDS_VERSION=7.2;Port=1433”