Re: [sqlalchemy] Cannot insert strings with a length greater than 2000 into columns with a datatype of Text, VARCHAR, or NVARCHAR using MS SQL Server 2017 and 2019

2020-10-18 Thread Nicolas Lykke Iversen
ide thing going on that can globally "fix" the >> problem, or perhaps the data is going in incorrectly, not sure. >> >> >> >> On Sat, Oct 17, 2020, at 6:13 AM, Nicolas Lykke Iversen wrote: >> >> Let's close this issue. Since pyODBC isn't going to fix anyt

Re: [sqlalchemy] Cannot insert strings with a length greater than 2000 into columns with a datatype of Text, VARCHAR, or NVARCHAR using MS SQL Server 2017 and 2019

2020-10-17 Thread Nicolas Lykke Iversen
orry for adding to the confusion, > > > no worries at all.this has to be the first time I've ever seen an > inaccuracy from your part, looking forward to the next one 15 years from > now :) > > > > > > > Simon > > On Fri, Oct 16, 2020 at 1:14 PM

Re: [sqlalchemy] Cannot insert strings with a length greater than 2000 into columns with a datatype of Text, VARCHAR, or NVARCHAR using MS SQL Server 2017 and 2019

2020-10-16 Thread Nicolas Lykke Iversen
ldren, then the hook gets called in the children, but somehow doesn't affect the INSERTs - the original error is produced for strings with a. length longer than 2000 characters. Best regards Nicolas On Thursday, October 15, 2020 at 7:39:08 PM UTC+2 Mike Bayer wrote: > > > On Thu, Oct 15,

Re: [sqlalchemy] Cannot insert strings with a length greater than 2000 into columns with a datatype of Text, VARCHAR, or NVARCHAR using MS SQL Server 2017 and 2019

2020-10-15 Thread Nicolas Lykke Iversen
collations > (_UTF8). These data types are also capable of representing the full > Unicode character range. > > If you can restrict yourself to SQL Server 2019, that might be a better > option. > > Simon > > On Thu, Oct 15, 2020 at 10:08 AM Nicolas Lykke Iversen >

Re: [sqlalchemy] Cannot insert strings with a length greater than 2000 into columns with a datatype of Text, VARCHAR, or NVARCHAR using MS SQL Server 2017 and 2019

2020-10-15 Thread Nicolas Lykke Iversen
re_cursor_execute > > Hope that helps, > > Simon > > > On Thu, Oct 15, 2020 at 8:27 AM Nicolas Lykke Iversen > wrote: > > > > Hi Mike, > > > > I have created an issue for pyodbc: > https://github.com/mkleehammer/pyodbc/issues/835#issuecomment-7089

Re: [sqlalchemy] Cannot insert strings with a length greater than 2000 into columns with a datatype of Text, VARCHAR, or NVARCHAR using MS SQL Server 2017 and 2019

2020-10-15 Thread Nicolas Lykke Iversen
2020 at 3:36:11 PM UTC+2 Mike Bayer wrote: > > > On Wed, Oct 14, 2020, at 5:35 AM, Nicolas Lykke Iversen wrote: > > Hi Mike, > > I've now tested inserting strings with more than 2000 characters using > Azure Data Studio (SQL Server GUI) and everything works. > >

Re: [sqlalchemy] Cannot insert strings with a length greater than 2000 into columns with a datatype of Text, VARCHAR, or NVARCHAR using MS SQL Server 2017 and 2019

2020-10-14 Thread Nicolas Lykke Iversen
SELECT * FROM msg') #rows = cursor.fetchall() #for r in rows: #print(r) print('finished') On Wednesday, October 14, 2020 at 12:43:25 AM UTC+2 Mike Bayer wrote: > > > On Tue, Oct 13, 2020, at 4:57 PM, Nicolas Lykke Iversen wrote: > > Thank you, Mike - very much appreciated!

Re: [sqlalchemy] Cannot insert strings with a length greater than 2000 into columns with a datatype of Text, VARCHAR, or NVARCHAR using MS SQL Server 2017 and 2019

2020-10-13 Thread Nicolas Lykke Iversen
in a varchar(max). Best regards Nicolas On Tue, 13 Oct 2020 at 22.22, Mike Bayer wrote: > > > On Tue, Oct 13, 2020, at 10:50 AM, Nicolas Lykke Iversen wrote: > > Hi SQLAlchemy, > > *System information:* > >- Mac OS X v. 10.15.7 >- Python v. 3.8.5 >- SQLAlche

[sqlalchemy] Cannot insert strings with a length greater than 2000 into columns with a datatype of Text, VARCHAR, or NVARCHAR using MS SQL Server 2017 and 2019

2020-10-13 Thread Nicolas Lykke Iversen
Hi SQLAlchemy, *System information:* - Mac OS X v. 10.15.7 - Python v. 3.8.5 - SQLAlchemy v. 1.3.19 - MS SQL Server 2017 and 2019 (both Enterprise and Docker images e.g. mcr.microsoft.com/mssql/server:2019-latest) *Problem*: I have an issue with inserting strings with a

Re: [sqlalchemy] How can I use a composite foreign-key constraint with a "mixin" class using declarative?

2020-09-03 Thread Nicolas Lykke Iversen
; https://github.com/sqlalchemy/sqlalchemy/blob/master/lib/sqlalchemy/dialects/mysql/base.py#L1871 > > whereas sqlite does this: > > > https://github.com/sqlalchemy/sqlalchemy/blob/master/lib/sqlalchemy/dialects/sqlite/base.py#L1120 > > Simon > > On Thu, Sep 3, 2020

Re: [sqlalchemy] How can I use a composite foreign-key constraint with a "mixin" class using declarative?

2020-09-02 Thread Nicolas Lykke Iversen
sa.Column(sa.Integer(), primary_key=True) > > name = sa.Column(sa.Text()) > > > > > > engine = sa.create_engine("sqlite:///", echo=True) > > Base.metadata.create_all(engine) > > > > > > > > > > Simon > > > > On Fri, Au

[sqlalchemy] How can I use a composite foreign-key constraint with a "mixin" class using declarative?

2020-08-28 Thread Nicolas Lykke Iversen
Hi all, I need to create identical models (mapped classes) for several database backends, e.g. MySQL and MSSQL, that take different __table_args__. Thus, I've opted for created one base for each database backend defining the __table_args__ (*base.py*), while using common mixins for defining