-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connect to sql server 2000 throws an uncaught exception and is terminated #36
Comments
I think it has something to do with the fact that I'm connecting to a SQL 2000 machine. Are the login credentials sent differently over tds for 2000 server? |
It looks like a Tedious token stream error. There is no tool in node-mssql to debug drivers atm, so please, go to c.on('error', function(err) { console.error(err) }); It should print the error to the console. Please, post it here so I could fix it. Thanks. |
I did exactly what you told me and in the console I now get: "Unrecognized token 0 at offset 134" |
Thanks, this is what I was afraid of. I need one more kindness from you. At the same line add: c.on('debug', function(msg) { console.log(msg) }); And to you connection config add: var config = {
options: {
debug: {
packet: true,
data: true,
payload: true,
token: true,
log: true
}
}
} This should produce a large amount of debug information about what's happening. I need this to figure out what is wrong with token stream parser. Thanks again. |
Here's the debug info you requested. I am happy to provide you more information or help you out with more iterations on this:
|
PS: let me know if the username of password is there 'hidden' in the stream, so I can change it in my server. |
Password is somehow encrypted in the stream, but I would recomend you to change the password... Sorry I didn't notice you about that in advance. |
(sorry wrong button) |
Basicaly all you need to do is to set TDS version in connection config: var config = {
options: {
tdsVersion: '7_1'
}
} In detail, strange things happen. The problem is caused by I will prepare a workaround when I have more time. |
Yes. Adding that option fixed it. Thanks! Maybe we should add it to the readme.md that this option is needed to use node-mssql with SQL Server version 2000? Because I have used node-mssql from the same machine with version SQL Server version 2008 in my network without a problem. |
This came right up when I ran into the same error and googled it, same reason, workaround worked great for me. Thanks! |
Excuse me.Could I use node-mssql at Access database?If it could,could you give me the demo? |
Unfortunately you can't. |
Thanks @patriksimek, you saved my day :) I was try to connect to SQL Server 2000 too, 3 hours without luck, before I found this page |
Thanks @patriksimek, i'm having the same issue until i found this page, btw, then i have another problem: message: 'Could not find stored procedure 'sys.sp_helpindex'.', I can execute exec sp_helpindex, but sys.sp_helpindex from the mssql 2000 query analyzer. any clue? thankyou. |
yea the option tds saved me, after five hors, thank you very much |
I am on a machine with node-mssql installed but also MSSMS. I can connect to a SQL Server (2000) using MSSMS (Microsoft SQL Server Management Studio), but when I use node-mssql to connect to the same SQL Server I don't get an error, but it doesn't connect either. This is my code:
The line console.log is never called and instead the node application throws an uncaught exception and is terminated:
When I connect with node-mssql using an ip address of another machine without mssql I get a nice ETIMEOUT, "Failed to connect to 10.101.0.11:1433 in 15000ms"
PS: I changed a lot of content in this issue since I originally wrote it 20 minutes ago!
The text was updated successfully, but these errors were encountered: