Created
February 1, 2016 10:32
-
-
Save oscarandreu/554b6e5b160e07a62648 to your computer and use it in GitHub Desktop.
edge sql example with connection string
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var edge = require('edge'); | |
var params = { | |
connectionString: "Data Source=xxx-yyy-zzz\instance;Initial Catalog=fooCatalog;Integrated Security=True", | |
source: "SELECT * FROM foobar" | |
}; | |
var testQuery = edge.func("sql", params); | |
testQuery(null, function (error, result) { | |
if (error) { console.error(error); return; } | |
if (result) { | |
console.debug(result); | |
} | |
else { | |
console.error("Foo"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment