Ms sql server

Not even having started with Zig yet - all is now preparing in my subconcious :slight_smile:

But… is there some Zig lib which offers support to connect with a MSSQL database?

Best wishes Eric

Probably, Converting header file to Zig code led to connect to SQL Server

1 Like

As @ktz_alias already mentioned, via ODBC.
SQL Server odbc driver 18 is perfectly usable from zig, either running on linux using unixodbc, or running on windows.

Using ODBC gives you options for changing backends easily, and not be limited to a specific DB

Hm… importing headers is still miles removed from actually retrieving structured data isn’t it?
ODBC is antique.

ODBC doesn’t work very well with SQLServer. Some years ago I actually wrote a OLE-DB PHP extension for that reason. That API gives you more complete access. It’s deprecated though. I don’t know what’s the modern way of communicating with SQLServer.

My experience is just the opposite. I’ve always had access to the latest features of the Server without any problems, also SQL Server command line tools such as sqlcmd and bcp use ODBC.

They undeprecated OLEDB in 2018. But it remains a Windows only technology.

They promote .Net, but they also say: “ODBC is the primary native data access API”

1 Like