4 ms·
Introducing the Microsoft Driver for Node.JS for SQL Server
- binarymax 14y agoFor those on *nix, there is this: https://github.com/w1nk/node-odbc https://github.com/w1nk/node-odbc It's not native SQL server, but does the job.
- jameswyse 14y agoI'm starting to like the new Microsoft.
- dmboyd 14y agoAll they need now is to bundle in mingw32 + msys.
- jallmann 14y agoI don't write for Node nor SQL Server, but that connection string looks gnarly. Is there a reason for not using a plain object that could then be merged with a set of internal defaults, then serialized from there? Ruby uses this pattern often, it's very clean and idiomatic.
- gouranga 14y agoYes. It is standard on windows to use connection strings. Also it stops then node.js driver being coupled to particular SQL client versions. It does look rather gnarly but if you work with it for a bit, you will find that connection strings are incredibly powerful.
- latch 14y ago"access from any Node.JS applications"....running on Windows. Pretty big limitation which suggests it's business as usual at Microsoft. Also "Driver={SQL Server Native Client 11.0};Server=(local);Database=AdventureWorks2012;Trusted_Connection={Yes}"; really should be: {server: 'localhost', database: 'AdventureWorks2012', trusted: true}
- Animus7 14y agoFor some reason the driver also requires Visual C++ 2010 as well as SQL Server Native Client 11.0, and includes significant C++ boilerplate which was clearly pasted verbatim from existing C++ codebases, thus ensuring the driver is beyond modification and customization for the typical Node dev. > The Microsoft Driver for Node.JS for SQL Server is hosted on Github, accentuating our continued involvement with the Open Source community. Except, this isn't so much openness as it is an underhanded attempt at migrating more developers to their proprietary platforms. It certainly makes business sense for them and I'm not going to make any normative claims, but I wish they wouldn't beat around the bush. The "Open Source" community that they're trying to cater to is more bullshit-averse than they seem to realize.
- gouranga 14y agoYou don't have to use it if you don't want to.
- daeken 14y ago> Except, this isn't so much openness as it is an underhanded attempt at migrating more developers to their proprietary platforms. Shame on them. They shouldn't be contributing software at all if it won't work on every platform. For all they know, I might want to connect to SQL Server from Node.JS running on my Commodore 64, but they don't provide the native code compiled for the 6510.
- melling 14y agoIs there a name given to your type of argument? The idea is to simply reply with an an absurd extreme counter example. People use it all the time. Perhaps it's some sort of extrapolation argument?
- huggyface 14y agoReductio Ad Absurdum (e.g. "for Microsoft to support anyone but themselves they thus must support every fringe platform, including those popular twenty years ago"). It's a particularly boring tactic of response and never adds anything to the conversation.
- mdaniel 14y agoI was expecting to see that someone ported jTDS (http://jtds.sourceforge.net/ http://jtds.sourceforge.net/) to JavaScript. I have zero idea if something like Emscripten could be used for an effort like that, nor if it would be performant enough for use in a database scenario, but I think a pure JavaScript library would probably be useful to a wider audience.
- pekim 14y agohttp://github.com/pekim/tedious http://github.com/pekim/tedious is a pure JavaScript implementation of (some of) the TDS protocol. [Disclaimer: I'm the author.]
- kop48 14y agoI've opened an issue to discuss the options for the connection object/array. Please feel free to let us know what you believe is a good approach! https://github.com/WindowsAzure/node-sqlserver/issues/17 https://github.com/WindowsAzure/node-sqlserver/issues/17 Thanks, Jonathan @kop48