Code Monkey home page Code Monkey logo

Comments (7)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 5, 2024
What is your OS where your program runs? Linux or Windows?

Alex

Original comment by [email protected] on 22 Jan 2014 at 10:24

from odbc.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 5, 2024
Linux

Original comment by [email protected] on 24 Jan 2014 at 12:20

from odbc.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 5, 2024
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 [email protected] on 30 Jan 2014 at 10:29

from odbc.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 5, 2024
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 [email protected] on 4 Feb 2014 at 6:28

from odbc.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 5, 2024
I think this https://codereview.appspot.com/60540043/ will fix it. Please 
review. Thank you.

Alex

Original comment by [email protected] on 6 Feb 2014 at 6:15

  • Changed state: Started

from odbc.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 5, 2024
All test passed. Thank you.

Original comment by [email protected] on 7 Feb 2014 at 12:50

from odbc.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 5, 2024
This issue was closed by revision 79ae99114308.

Original comment by [email protected] on 7 Feb 2014 at 1:40

  • Changed state: Fixed

from odbc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.