Hi Shyam,

There's actually a newer version of the driver out, but it's been renamed to 
'msnodesql'. Please install that one first, and try again. Also, why are you 
using SQL Server Native Client 10.0 instead of 11.0?

Cheers,

Jonathan

From: [email protected] [mailto:[email protected]] On Behalf Of 
Shyam Vaidya
Sent: Friday, 30 November 2012 1:36 AM
To: [email protected]
Subject: [nodejs] How to connect SQL Server using node.js

I have used following code :

var sql = require('node-sqlserver');
var connectionString = "Driver={SQL Server Native Client 
10.0};Server=(local);Database=v3;Uid=sa;Pwd=sa;";

sql.open(connectionString, function(err, conn) {
 if(err) {
            console.log(err);
 }
else {
   var command = "{select * from tblpatientmaster}";
     conn.queryRaw(command, function(err, results) {
         if(err)
                        {
            console.log(err);
       }
         else
                        {
                                                for(var i = 0; i < 
result.rows.length; i++)
                                                {
                                                            console.log(i + ": 
" + "Key = " + result.rows[i][0]);
                                                            console.log(i + ": 
" + "Culture = " + result.rows[i][1]);
                                                            console.log(i + ": 
" + "Value = " + result.rows[i][2]);
                                                }
              }
        });
    }
 });

but getting error :

Can not connect to sql server : error no 53.

Tried changing in connection string and variouse changes in network (TCP/IP 
etc) related setting in SQL Server ,but not getting connected

Any help please?
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to 
[email protected]<mailto:[email protected]>
To unsubscribe from this group, send email to
[email protected]<mailto:[email protected]>
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to