DLL error on connecting to Latin1_General_BIN collation server
See original GitHub issueWhen using tedious, I cannot connect to SQL Server using the Latin1_General_BIN collation created using the docker image that MS puts out. The server is created using the following command:
docker run --rm -d --name sqlserver -p 1433:1433 -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Password(12)" -e "MSSQL_COLLATION=Latin1_General_BIN" mcr.microsoft.com/mssql/server:2017-latest
When attempting to connect, I get the following error:
RequestError: Could not load the DLL (server internal), or one of the DLLs it references. Reason: 126(The specified module could not be found.).
at Parser.<anonymous> (/tmp/test/node_modules/tedious/lib/connection.js:1153:27)
at Parser.emit (events.js:314:20)
at Parser.<anonymous> (/tmp/test/node_modules/tedious/lib/token/token-stream-parser.js:35:14)
at Parser.emit (events.js:314:20)
at addChunk (/tmp/test/node_modules/tedious/node_modules/readable-stream/lib/_stream_readable.js:298:12)
at readableAddChunk (/tmp/test/node_modules/tedious/node_modules/readable-stream/lib/_stream_readable.js:280:11)
at Parser.Readable.push (/tmp/test/node_modules/tedious/node_modules/readable-stream/lib/_stream_readable.js:241:10)
at Parser.Transform.push (/tmp/test/node_modules/tedious/node_modules/readable-stream/lib/_stream_transform.js:139:32)
at doneParsing (/tmp/test/node_modules/tedious/lib/token/stream-parser.js:122:14)
at /tmp/test/node_modules/tedious/lib/token/infoerror-token-parser.js:48:5 {
code: 'EREQUEST',
number: 17750,
state: 0,
class: 16,
serverName: '04ed0a6c188f',
procName: 'sp_executesql',
lineNumber: 1
}
with the following lines being emitted by sqlserver in its error log:
2020-12-24 01:36:03.31 spid51 Error: 17750, Severity: 16, State: 0.
2020-12-24 01:36:03.31 spid51 Could not load the DLL (server internal), or one of the DLLs it references. Reason: 126(The specified module could not be found.)
I used the example connection code from the Getting Started section with the following configuration object:
var config = {
server: "localhost",
options: {
database: 'master',
encrypt: false
},
authentication: {
type: "default",
options: {
userName: "sa",
password: "Password(12)",
}
}
};
I can connect to and query the server just fine using the following clients:
- msnodesqlv8@2
- sqlcmd
- pymssql
- PHP PDO
- JDBC via DataGrip
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
DLL error on connecting to Latin1_General_BIN collation ...
Tedious returns an error thrown from the server: RequestError: Could not load the DLL (server internal), or one of the DLLs it references....
Read more >Setting Character Sets and Collations - MariaDB
Both character sets and collations can be specified from the server right down to the column level, as well as for client-server connections....
Read more >Latin1_General_BIN performance impact when changing the ...
Collations in SQL Server determine the rules for matching and sorting character data. Normally, you would choose a collation first based on ...
Read more >10.4 Connection Character Sets and Collations
The client sends SQL statements, such as queries, over the session connection. The server sends responses, such as result sets or error messages, ......
Read more >How to Fix the Collation and Character Set of a MySQL ...
This article only applies to Atlassian products on the server and data ... TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ERROR 3780 (HY000): ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

OK I’ve posted help on the Microsoft forum: https://docs.microsoft.com/en-us/answers/questions/221376/dll-error-on-connecting-to-latin1-general-bin-coll.html
I’ll keep this discussion updated if I hear anything back from their side!
Oh yes my bad 🤦♂️ I missed the
-e "MSSQL_COLLATION=Latin1_General_BIN"in the run command, I’m seeing the issue as well