diff --git a/Plugins/MSSQLDriverPlugin/CFreeTDS/include/sybdb.h b/Plugins/MSSQLDriverPlugin/CFreeTDS/include/sybdb.h index e09e109ae..917609597 100644 --- a/Plugins/MSSQLDriverPlugin/CFreeTDS/include/sybdb.h +++ b/Plugins/MSSQLDriverPlugin/CFreeTDS/include/sybdb.h @@ -44,12 +44,17 @@ typedef struct loginrec LOGINREC; #define SYBDATETIMN 111 #define SYBUNIQUE 36 -// Login property constants for dbsetlname() — values verified against FreeTDS 1.4 sybdb.h -#define DBSETHOST 1 -#define DBSETUSER 2 -#define DBSETPWD 3 -#define DBSETAPP 5 // 4 is unused; real FreeTDS DBSETAPP = 5 -#define DBSETCHARSET 7 // Client charset for dbsetlname() — controls string encoding +// Login property constants for dbsetlname() — values from FreeTDS master/include/sybdb.h +#define DBSETHOST 1 +#define DBSETUSER 2 +#define DBSETPWD 3 +#define DBSETAPP 5 +#define DBSETBCP 6 +#define DBSETNATLANG 7 +#define DBSETCHARSET 10 +#define DBSETPACKET 11 +#define DBSETENCRYPT 12 +#define DBSETDBNAME 14 // Convenience macros (match FreeTDS sybdb.h) #define DBSETLHOST(x, y) dbsetlname((x), (y), DBSETHOST) diff --git a/Plugins/MSSQLDriverPlugin/MSSQLPlugin.swift b/Plugins/MSSQLDriverPlugin/MSSQLPlugin.swift index d31469650..b77115573 100644 --- a/Plugins/MSSQLDriverPlugin/MSSQLPlugin.swift +++ b/Plugins/MSSQLDriverPlugin/MSSQLPlugin.swift @@ -196,6 +196,7 @@ private final class FreeTDSConnection: @unchecked Sendable { _ = dbsetlname(login, user, Int32(DBSETUSER)) _ = dbsetlname(login, password, Int32(DBSETPWD)) _ = dbsetlname(login, "TablePro", Int32(DBSETAPP)) + _ = dbsetlname(login, "us_english", Int32(DBSETNATLANG)) _ = dbsetlname(login, "UTF-8", Int32(DBSETCHARSET)) _ = dbsetlversion(login, UInt8(DBVERSION_74))