10

Is there a simple way for Meteor.js to interact with a SQL Server the same way it does with MongoDB? For example, by using the Node.js MSSQL driver found here: http://www.microsoft.com/en-us/download/details.aspx?id=29995 - however ideally this needs to work in linux.

The closest I have found was tedious - how can I use this, or another alternative, in Meteor?

1 Answer 1

14
+100

You probably have read the meteor docs. You will find it is given there :

The current release of Meteor supports MongoDB, the popular document database, and the examples in this section use the MongoDB API. Future releases will include support for other databases.

So until 'that' future release, you won't have native support for other databases. Your best shot is to use packages that allow you to connect MS-SQL. You can check the packages listed here or search them here. Some of them are:

  1. https://npmjs.org/package/tedious
  2. https://npmjs.org/package/msnodesql
  3. https://npmjs.org/package/tds

Better use one that is popular and more recently updated.

Sign up to request clarification or add additional context in comments.

3 Comments

I mentioned the driver & tedious in my original question - tds has been defunct for over a year now. Have you got any examples of using the MSSQL driver for Node within Meteor, or tedious?
I found this example shiggyenterprises.wordpress.com/2013/03/13/…. It is in coffeescript, so copy the raw code and then use jashkenas.github.io/coffee-script 'Try CoffeeScript' to get JavaScript equivalent.
Cheers, unfortunately __meteor_bootstrap.require doesn't work outside of isServer. However it's been replaced in 0.6 by Npm.require. Unfortunately for me 0.6 is only available on *nix & mac distro.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.