Thanks both - this is really useful feedback.
I agree that SQL Server support belongs on the roadmap, especially for people looking to bring existing Xojo-style business/database apps across to Objo. Pete, your use case is exactly the kind of thing I want Objo to support well, that is, an app that needs to talk to an existing Microsoft SQL Server database without a lot of friction.
After looking into this, I think the best first step is to add first-class SQL Server support rather than starting with a generic ODBC layer:
The distinction is that ODBC is a general driver interface, whereas SQL Server is the actual database engine being targeted here. A generic ODBCDatabase class would potentially let Objo talk to many different installed ODBC drivers, but it also brings a larger support surface: DSNs, native driver installation, Windows/macOS/Linux driver manager differences, Apple Silicon vs Intel driver architecture issues, and provider-specific metadata behaviour. That's a large surface area for bugs to creep in.
For SQL Server and Azure SQL specifically, Objo can use Microsoft's current .NET SQL Server provider, Microsoft.Data.SqlClient really easily. I've checked the licensing and it is MIT licensed, so it is suitable for Objo. This should let me add a SQLServerDatabase class that fits into the existing Objo database API alongside SQLiteDatabase, MySQLDatabase, and PostgreSQLDatabase.
The goal would be that SQLServerDatabase supports the same common Objo database surface: Connect(), Close(), SelectSQL() etc where SQL Server exposes it cleanly.
So the current plan is:
- Add
SQLServerDatabase for SQL Server and Azure SQL first.
- Keep
ODBCDatabase as a separate possible compatibility feature later.
- Make sure the implementation works with Objo's existing
Database interface so provider-neutral code can still be written where possible.
@bgrommes, your offer to test against both local SQL Server and Azure SQL is very welcome. Once the first implementation is in place, real-world testing against Windows Server and Azure SQL would be much more valuable than only testing against a toy local database.
I've logged this as an accepted feature request here: https://feedback.objo.dev/feature/468
I hope this is OK?