nodejs中edje-sql 读取MSSQL数据-笔记

来源:互联网 发布:网络视听通则 编辑:程序博客网 时间:2024/05/19 19:12

nodejs代码:

var edge = require('edge');var sqlPath = "Data Source=192.168.15.71;Initial Catalog=Finance;Persist Security Info=True;User ID=sa;Password=sa123.abc;Connect Timeout=180;Pooling=False";var getInsuranceChannelType = edge.func('sql', {    source: function () {/*     select top 2 * from [InsuranceChannelType]     */},    connectionString: sqlPath});getInsuranceChannelType(null, function (error, result) {    if (error) throw error;    console.log(result);    //console.log(result[0].ProductName);    //console.log(result[1].ReorderLevel);});

运行结果:


0 0
原创粉丝点击