-
Notifications
You must be signed in to change notification settings - Fork 143
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
panicking on Linux 4.6.0-1.el7.elrepo.x86_64 #99
Comments
Can you, please, translate this error into English? Even better - there are 3 calls into api.SQLSetEnvUIntPtrAttr in initDriver function - which of 3 calls fails? Thank you. Alex |
Hi Alex, This error is in korean and I dont know how to translate it to english. I have tried using google translator but could not got any help. And I dont know how to change encoding in your package. Actually all 3 calls to api.SQLSetEnvUIntPtrAttr are panicking. It is panicking on the first call initially(line 35), If we comment out the first call it will panic on 2nd call(line 43) and similarly on 3rd call(line 50). Please help. Thanks, |
I am sorry, but I cannot help you without understand the error message. Does your perl code returns non-English errors too? Alex |
No, I am not getting error in perl script. I am able to connect to terradata db with perl. |
Please, change your perl script so you get an error when you run it. Do you get an error message in Korean? Alex |
Hi Alex, I am not sure if that is korean, I guess this is because of encoding. Is there a function in your package where I can set encoding. And I am trying it on Linux 4.6.0-1.el7.elrepo.x86_64. Can you try on this version or do you have a way to confirm that it works for this version to connect to Teradata db. I tried on a VM having Linux 3.10.0-229.el7.x86_64 and your package is working on this VM. Vishal |
Why would Korean be default setting? I suspect some config file somewhere asks for Korean error messages. Did you try changing the code that it fails to see if error message is not English?
The only place where you can specify this is in
I need both Linux installation and db that you are referring. I have neither. Alex |
Did you try changing the code that it fails to see if error message is not English? I did not change the perl code, but tried using weigj/go-odbc, it is also giving panic in these weird characters. I commented out all of the code in my program while using your package and found out that it is panicking while initializing only. I tried adding Charset = UTF-8 in odbc.ini file, but as I mentioned before program is not reaching out to this line to open connection, it is failing while initializing your package. Thats okay if you dont have the environment. I have a VM with Linux 3.x and tested there and it is initializing properly there. Vishal |
Do change the perl code. Maybe change SQL into something that cannot be executed (for example replace SELECT with ZZZZ). And see if it gets proper error message.
It just shows that it is something configured on your computer,
Yes. Your error / stacktrace is from
the init function. So I was wrong about "sql.Open" second parameter affect this. It does not. That only leaves whatever config files you have for your ODBC driver. What driver do you use? How did you configure it?
No the odbc.ini file is actually might affect things here (there might be other config files too). But I do not know if Charset = UTF-8 is valid line to add to odbc.ini file, You need to read your ODBC driver documentation about that.
Well if something works for you, I am happy to leave it at that. Maybe you could also compare ODBC drivers installed on both machines. Driver versions and their config files. You might spot the difference that is important. Alex |
Hi Alex,
I am using your package to connect to teradata, but it is panicking with the following error.
-bash-4.2$ go run bhn_equipment.go
panic: SQLSetEnvUIntPtrAttr: {㠳6} ㈵″㠳4
goroutine 1 [running]:
github.com/alexbrainman/odbc.init.1()
/home/vbhatia/github.com/src/github.com/alexbrainman/odbc/driver.go:72 +0x7f
github.com/alexbrainman/odbc.init()
/home/vbhatia/github.com/src/github.com/alexbrainman/odbc/utf16.go:56 +0x6c
main.init()
/home/vbhatia/github.com/src/bhn/bhn_equipment.go:25 +0x4e
exit status 2
here is my code
package main
import (
"database/sql"
"fmt"
_ "github.com/alexbrainman/odbc"
)
func main() {
}
DSN entry is correct as we are able to connect to teradata using perl.
Please help.
-Vishal
The text was updated successfully, but these errors were encountered: