Comments (4)
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.
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.
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.
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)
- Description attribute returns only first char of name (as byte) using Oracle ODBC & Linux HOT 2
- Trimmed varchar results.
- Column names get wonky on 64-bit system using iSeries DB2 driver HOT 3
- Oracle and Decimal_cvt issue
- IronPython 2.7 StopIteration exception raised when retrieving SQL data set
- "invalid literal" exceptions querying empty numeric fields when using LinuxODBC with FreeTDS
- use mbdtools,chinese character encoded by gb charset can't access correctly
- Passing datetime.date returns TypeError: Wrong Type HOT 2
- Mapping bigint in sqlserver 2008 into float, instead of int in python3
- Bad cursor description (mixed bytes and strings) on Ubuntu 14.04 HOT 2
- Row objects don't raise KeyError for invalid fields
- Data source name not found on linux + unixodbc + as400 iseries driver HOT 1
- Cannot access column names by attribute HOT 4
- pypyodbc doesn't support the MSSQL datetimeoffset column type.
- state = err_list[0][0] Index out of range
- UnicodeDecodeError because UTF-16 surrogate pairs are not handled HOT 1
- Enhancement: Support for lists as SQL parameters
- executemany is very slow
- Sage Line 100 Odbc connect KO HOT 1
- Not working on Windows 7 64 bit 3.4.3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pypyodbc.