Coder Social home page Coder Social logo

Comments (8)

MathMagique avatar MathMagique commented on May 20, 2024 1

The default parameter type mentioned in the commit message is automatically replaced by more appropriate types once non-Null values are passed.

from turbodbc.

dirkjonker avatar dirkjonker commented on May 20, 2024 1

Awesome, just tested the master branch and it works great!

from turbodbc.

MathMagique avatar MathMagique commented on May 20, 2024

Hi Dirk! Thanks for the report. I have not yet played with FreeTDS, but I know that Microsoft's official ODBC driver has no problems with parameters. Unfortunately, it seems to be available for Linux and Windows only.

If FreeTDS does not support parameters, performance of inserts will be pretty slow. But I'll have to check in more detail.

from turbodbc.

dirkjonker avatar dirkjonker commented on May 20, 2024

Hi Michael, thanks for the quick reply! Parameterization works fine if I use pyodbc + FreeTDS, so turbodbc must be calling some kind of ODBC function that FreeTDS does not support. I'll see if I can find something.

from turbodbc.

MathMagique avatar MathMagique commented on May 20, 2024

That would be great. As far as I know, pyodbc does not transfer parameters in batches, so any calls required to enable batches might be harmful.

Btw: @keitherskine does not seem to have the issue you report with MSSQL, but he uses Microsoft's driver to connect (see his comments in the otherwise unrelated #39).

from turbodbc.

dirkjonker avatar dirkjonker commented on May 20, 2024

@MathMagique the problem seems to be that FreeTDS has not implemented SQLDescribeParam: https://github.com/FreeTDS/freetds/blob/Branch-1_00/doc/api_status.txt

I updated the title and initial post with some more information.

from turbodbc.

MathMagique avatar MathMagique commented on May 20, 2024

Then there may be some hope left ;-). I use SQLDescribeParam for the initial guess of what a parameter is supposed to be. Many databases don't know that anyway and I have a mechanism in place that can handle differing parameter types.

It should be easy to implement a fallback to something like an integer type when SQLDescribeParam is not available. The remaining code should already be able to handle Python parameters that deviate from this integer type, then.

from turbodbc.

MathMagique avatar MathMagique commented on May 20, 2024

Thanks for helping identifying the issue!

from turbodbc.

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.