[web2py] Re: Upgraded to 2.19 and SQL Server date insert throws an error

2023-01-12 Thread Davidiam
Just for clarity on this issue: if you save your sessions to MSSQL you will get an error because the MS SQL driver is expecting the timestamp to be a string, but instead it is a datetime object due to the ".isoformat()" added in version 2.19. By modifying the line 1247 in globals.py, putting

[web2py] Re: Upgraded to 2.19 and SQL Server date insert throws an error

2023-01-11 Thread Davidiam
Hi, Has anyone found a solution for this? We are experiencing the same issue with 2.22.5 and storing the session in the db. As a work-around, we have removed the ".isoformat" from the line 1247 of the gluon\globals.py: modified_datetime=request.now, #.isoformat(), What would be the impact

[web2py] Re: Upgraded to 2.19 and SQL Server date insert throws an error

2020-06-03 Thread Seth J
Thanks for pointing the function. But it looks like the error is happening on the Session insert. See below *query* block: - Variables e DataError('22007', '[22007] [Microsoft][ODBC SQL...e from character string. (241) (SQLExecDirectW)') Context locals request session response

[web2py] Re: Upgraded to 2.19 and SQL Server date insert throws an error

2020-06-03 Thread Dave S
On Wednesday, June 3, 2020 at 2:04:02 PM UTC-7, Seth J wrote: > > I am not sure how to view the query sent to MSSQL. > Does this help/? https://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#_lastsql> > Here's a little more from the error record: > > >- >

[web2py] Re: Upgraded to 2.19 and SQL Server date insert throws an error

2020-06-03 Thread Seth J
I am not sure how to view the query sent to MSSQL. Here's a little more from the error record: - *File C:\inetpub\wwwroot\gluon\packages\dal\pydal\adapters\base.py in insert at line 539* code arguments variables Function argument list (self=, table=, fields=[(,

[web2py] Re: Upgraded to 2.19 and SQL Server date insert throws an error

2020-06-03 Thread Jim S
Can you pinpoint the line in your code that is causing the error? Can you see the SQL statement that is being sent to the server? -Jim On Tuesday, June 2, 2020 at 11:29:27 PM UTC-5, Seth J wrote: > > Yes, same error. 路‍♂️ > > Error ticket for "PubView"Ticket ID > >

[web2py] Re: Upgraded to 2.19 and SQL Server date insert throws an error

2020-06-02 Thread Seth J
Yes, same error. 路‍♂️ Error ticket for "PubView"Ticket ID 172.20.145.208.2020-06-03.00-26-05.a903caa0-1d7d-4612-a5f9-104967995098 Version web2py™ Version 2.20.4-stable+timestamp.2020.05.03.05.18.50 Python Python 2.7.10: C:\Python27\python.exe (prefix: C:\Python27)Traceback 1. 2. 3. 4. 5. 6. 7.

[web2py] Re: Upgraded to 2.19 and SQL Server date insert throws an error

2020-06-01 Thread Clemens
Have you already tried the latest version 2.20.4-stable+timestamp.2020.05.03.05.18.50 ? On Monday, June 1, 2020 at 8:12:08 PM UTC+2, Seth J wrote: > > I am running IIS connecting to SQL Server. Upgrade seems to have > introduced an error to an