Skip to content

Instantly share code, notes, and snippets.

@oscarandreu
Created February 1, 2016 10:32
Show Gist options
  • Save oscarandreu/554b6e5b160e07a62648 to your computer and use it in GitHub Desktop.
Save oscarandreu/554b6e5b160e07a62648 to your computer and use it in GitHub Desktop.
edge sql example with connection string
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