问题
I have this simple nodejs page http://pastebin.com/HxMsHBbg
/**
* Module dependencies.
*/
var express = require('express'),
http = require('http'),
url = require('url'),
util = require('util');
var nconf = require('nconf');
var sql = require('node-sqlserver');
nconf.env();
var conn = nconf.get("SQL_CONN");
var app = express();
app.get('/', function(req, res){
var qs = url.parse( req.url, true );
res.writeHead(200, {'Content-Type': 'application/json; charset=utf-8'});
var alldata={};
var select = "SELECT 1";
sql.query(conn, select, function(err, items) {
res.end(JSON.stringify(alldata));
});
});
http.createServer(app).listen(process.env.PORT || 3000, function(){
console.log("Express server listening ");
});
When SQL_CONN is a MSSQL DB with a collation - say - Greek_CI_AI , then I get the error
HRESULT: 0x6d HTTP status: 500 HTTP reason: Internal Server Error
If the database in in the default collation, then there is no problem. Does anyone have a solution or is it a bug?
回答1:
The issue has been resolved, see here
来源:https://stackoverflow.com/questions/12216003/azure-nodejs-site-cannot-connect-to-sql-db-that-has-a-collation-different-than-t