Login and SQLBatch commands are working for me now. I'll take a look at RPC requests if/when I need them.
Also found a bug in the writable buffer code.
Bug fix - need to call writeUInt16LE on this buffer
Added support for TDS 7.1 login and SQLBatch
This can be enabled on the connection with config.options.tdsVersion = "7_1"
Note that connection.execSQL is not working so there may be a problem
with RPC requests. I added a note about this to the minimal.js example.
Thank you for this. I definitely want to merge these changes, but it might have to wait for a bit.
I am currently nearing the end of big reworking of the way that incoming data is buffered and read. It'll work in much more node-like manner, and the nasty throw/catch/rewind that happens when an attempt is made to read past the end of the currently available data is got rid off. It'll also be a lot more efficient for large results fields.
Unfortunately this change is wide ranging, affecting large chunks of many files, including most of the unit tests. I'm desperate to finish this before taking on any other changes, otherwise the merge back to master will become a nightmare.
Once I've finished this work I'll work out how to apply your changes.
No problem. My itch is scratched. Also, the FreeTDS code was really helpful for this.
Just a quick note to anyone having issues with TDS 7.1: This code in this pull request works perfectly as long as you use ExecSqlBatch rather than ExecSql. Thanks a million pdodde
Transactions are not supported on TDS 7.1. Why?