npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tds4node

v0.0.11

Published

tds is an implementation of the TDS protocol,which is used for communication with Microsoft's SQL Server.

Downloads

12

Readme

tds (node implementation of the TDS protocol for SQL Server)

tds is an implementation of the TDS protocol, which is used for communication with Microsoft's SQL Server.

Status

Current version: v0.0.9

Change log:

  • [v0.0.1] initial version
  • [v0.0.5] bugfixing because of issues 1 - 4
  • [v0.0.6] bugfixing because of issues 5
  • [v0.0.7] bugfixing because of issues 6
  • [v0.0.8] bugfixing because of issues 7
  • [v0.0.9] bugfixing because of issues 8

requierements:

  • Windows System with node.js (version >= 0.6.6)
    (other OS should be work too, but not tested until now)
  • CentOS 6.4 with node.js (version 0.10.4) node.js
    (has been tested succesfully)
  • SQL Server (version >= 2000) connection over TCP/IP (SQL authentification),
    SQL Server Express 2012

install

requierd modules

install the tds modul manually by copying the tds folder into the node_modules folder (npm coming soon) edit default.js, configure your database connection

module.exports = {

		ConnectionString : {
			/** database server */
			Server:'yourServer',

			/** database user's name */
			Login: 'yourUser',
			/** name of database to connect */
			Database: 'yourDatabase',
			/** database user's password */
			Password: 'yourPassword',
			/** database port */
			Port: 1433,
			/** socket-connection timeout */
			Timeout:10000
		},

		/** number of connections to use in connection pool
				0 will disable connection pooling
		*/
		poolSize: 0,
		/** duration of node-pool timeout */
		poolIdleTimeout: 30000000,
		/** port on that the tds server is listen */
		tdsServerPort: 8888
	}
  1. open a commad shell
  2. navigate to your node folder (i.e. "c:\program files\nodejs")
  3. cd node_modules
  4. cd tds4node
  5. start the tds server: node tds_server

normally tds_server listen at port 8888
to test your installation, start your browser and fire a simple request like:
http://localhost:8888/tds?select getdate() as d

on a working system the response of the example request looks like the following JSON data with the actual date:

{

    "result": [
        {
            "colData": [
                {
                    "value": "d",
                    "precision": null,
                    "scale": null,
                    "type": 61
                }
            ],
            "rows": [
                [
                    "2012-11-02T16:15:48.716Z"
                ]
            ],
            "outputParams": [ ],
            "returnStatus": null
        }
    ],
    "error": {
        "sqlErrNo": null,
        "message": ""
    }

}

notice: make sure, that your browser is able to handle http-headers
with 'Content-Type': 'application/json; charset=utf-8', for Firefox you can use JSONView

Test

after install you are able to run the tests

  1. change to your node folder
  2. cd node_modules
  3. cd tds4node
  4. node tds_test

Documentation

Modul structure overview:

modul structure

browse the deatiled documentation here. (docs/chart/tds_chart.html)

License

(The MIT License)

Copyright (c) 2011-2012 H. Ristau

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.