Closed GoogleCodeExporter closed 9 years ago
What is your OS where your program runs? Linux or Windows?
Alex
Original comment by alex.bra...@gmail.com
on 22 Jan 2014 at 10:24
Linux
Original comment by masatsug...@gmail.com
on 24 Jan 2014 at 12:20
Sorry, I didn't have time to investigate your problems. But I will look into
them as soon as I can. (I need to find a way to install "ODBC Driver 11 for SQL
Server" driver on a Linux computer, to see the problem.)
Alex
Original comment by alex.bra...@gmail.com
on 30 Jan 2014 at 10:29
Can you, please, try this change:
diff --git a/param.go b/param.go
--- a/param.go
+++ b/param.go
@@ -8,7 +8,6 @@
"code.google.com/p/odbc/api"
"database/sql/driver"
"fmt"
- "runtime"
"time"
"unsafe"
)
@@ -150,18 +149,17 @@
}
ps := make([]Parameter, n)
// fetch param descriptions
- if runtime.GOOS == "windows" {
- // SQLDescribeParam is not implemented by freedts
- for i := range ps {
- p := &ps[i]
- ret = api.SQLDescribeParam(h, api.SQLUSMALLINT(i+1),
- &p.SQLType, &p.Size, &p.Decimal, &nullable)
- if IsError(ret) {
- // will try request without these descriptions
- continue
- }
- p.isDescribed = true
+ for i := range ps {
+ p := &ps[i]
+ ret = api.SQLDescribeParam(h, api.SQLUSMALLINT(i+1),
+ &p.SQLType, &p.Size, &p.Decimal, &nullable)
+ if IsError(ret) {
+ // SQLDescribeParam is not implemented by freedts,
+ // it even fails for some statements on windows.
+ // Will try request without these descriptions
+ continue
}
+ p.isDescribed = true
}
return ps, nil
}
See if that helps. Thank you.
Alex
Original comment by alex.bra...@gmail.com
on 4 Feb 2014 at 6:28
I think this https://codereview.appspot.com/60540043/ will fix it. Please
review. Thank you.
Alex
Original comment by alex.bra...@gmail.com
on 6 Feb 2014 at 6:15
All test passed. Thank you.
Original comment by masatsug...@gmail.com
on 7 Feb 2014 at 12:50
This issue was closed by revision 79ae99114308.
Original comment by alex.bra...@gmail.com
on 7 Feb 2014 at 1:40
Original issue reported on code.google.com by
masatsug...@gmail.com
on 22 Jan 2014 at 5:41