Not even having started with Zig yet - all is now preparing in my subconcious
But… is there some Zig lib which offers support to connect with a MSSQL database?
Best wishes Eric
Not even having started with Zig yet - all is now preparing in my subconcious
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
Converting C header file:
Documentation - The Zig Programming Language
SQL Server Native Client Header
Header and Library Files - SQL Server Native Client | Microsoft Learn
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”