无法将Geography数据类型插入表 - Azure Mobile服务

时间:2015-09-17 11:23:26

标签: javascript sql azure azure-mobile-services

大家好,我的移动服务后端脚本有问题 我不能在我的表中插入行 完整的脚本:

function insert(item, user, request) {

var sessions = tables.getTable('sessions_res');

var point = "geography::STPointFromText('POINT('"+ item.longtitude + " " +     item.lattitude + "')' , 4326)";



console.log(point);
var queryString = "INSERT INTO sessions_res(id, restaurant_id, person_number ,budget , category , coordination) VALUES (?, ?, ? , ? , ? , ?)";


mssql.query(queryString, [item.id, item.restaurant_id, item.person_number, item.budget, item.category, point], {
    success: function () {
        request.respond(statusCodes.OK, {});
    }
});
}

0 个答案:

没有答案