Coder Social home page Coder Social logo

Comments (4)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 20, 2024
It appears to not get the lengths correctly because the pyodbc uses the actual 
size of the input string as the length of the nvarchar. pypyodbc uses the 
default of 255, and when it's larger than that, it switches to ntext. 

Original comment by [email protected] on 1 May 2013 at 11:51

from pypyodbc.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 20, 2024
It appears to be line 1048 that is the cause - My guess is it is assuming MS 
Access. Changing that from uppercase U to lowercase, and returning the true 
length of the field seems to fix it. Same thing with the S on line 1054. Line 
1203 in _bind_params needs to be fixed as well.

Original comment by [email protected] on 2 May 2013 at 12:15

from pypyodbc.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 20, 2024
Accepted. I will look into this issue during weekends.

Original comment by [email protected] on 2 May 2013 at 1:34

  • Changed state: Accepted

from pypyodbc.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 20, 2024
I've attached the modified pypyodbc.py that works. I don't know how to get a 
patch, and it doesn't include the dev features from github, but you can see the 
changes I made. I see that it makes queries to check data types... it's execing 
sp_datatype_info 93, 91, and 92. Checking the datetime types or something. 
Anyway, if you call sp_datatype_info with just the odbcver=3 you get a list of 
the datatypes and their maximum sizes. The maximum size of a varchar in SQL 
2000 (the version that I'm using) is 8000.


Original comment by [email protected] on 2 May 2013 at 5:20

Attachments:

from pypyodbc.

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.