cretz / node-tds

Pure JS implementation of TDS protocol for Microsoft SQL Server
http://cretz.github.com/node-tds
MIT License
104 stars 23 forks source link

sql server instance support? host paramter support (local)? #2

Open jiangjianxiao opened 12 years ago

jiangjianxiao commented 12 years ago

host:"(local)" -> ENOTFOUND host:"localhost\sqlexpress" -> ENOTFOUND

cretz commented 12 years ago

The host should support "localhost" or "127.0.0.1". This is literally the host used in the socket: https://github.com/cretz/node-tds/blob/master/src/tds-client.coffee#L42. There are some undocumented connections options you can provide such as instanceName which will choose the instance (actually sent as part of a TDS prelogin packet)

I will leave this issue open until I document some of those other connection options.

jonbuffington commented 12 years ago

@cretz Is instanceName one of the Connection option keys available in 0.1.0?

cretz commented 12 years ago

Yes, it should be, but just not documented. I have not yet tested its functionality.