Error when inserting double quotes in json type column.

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
Trylle
Posts: 3
Joined: Mon 11 Jul 2016 23:22

Error when inserting double quotes in json type column.

Post by Trylle » Mon 11 Jul 2016 23:37

Error when inserting double quotes in json type column.

error code: 22P02
invalid input syntax for type json

Pinturiccio
Devart Team
Posts: 2125
Joined: Wed 02 Nov 2011 09:44

Re: Error when inserting double quotes in json type column.

Post by Pinturiccio » Thu 14 Jul 2016 14:05

We could not reproduce the issue. Please provide us the following:
1. A query example with a corresponding DDL script;
2. dotConnect for PostgreSQL version;
3. PostgreSQL version;
4. If possible, please create and send us a small test project.

Trylle
Posts: 3
Joined: Mon 11 Jul 2016 23:22

Re: Error when inserting double quotes in json type column.

Post by Trylle » Fri 15 Jul 2016 00:28

Json Data: "\""
Devart.Data.postgreSql.Entity.EF6 version: 7.6.667.0
PostgreSQL version: 1.18.1
DetailMessage: Token """ is invalid.
Stacktrace:

Code: Select all

   at Devart.Data.PostgreSql.PgSqlDataReader.f(Int32 A_0)
   at Devart.Data.PostgreSql.PgSqlCommand.InternalExecute(CommandBehavior behavior, IDisposable stmt, Int32 startRecord, Int32 maxRecords)
   at Devart.Common.DbCommandBase.InternalExecute(CommandBehavior behavior, IDisposable stmt, Int32 startRecord, Int32 maxRecords, Boolean nonQuery)
   at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
   at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
   at Devart.Common.DbCommandBase.ExecuteNonQuery()
   at Devart.Data.PostgreSql.Entity.l.j()
   at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.<NonQuery>b__0(DbCommand t, DbCommandInterceptionContext`1 c)
   at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
   at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.NonQuery(DbCommand command, DbCommandInterceptionContext interceptionContext)
   at System.Data.Entity.Internal.InterceptableDbCommand.ExecuteNonQuery()
   at System.Data.Entity.Core.Mapping.Update.Internal.DynamicUpdateCommand.Execute(Dictionary`2 identifierValues, List`1 generatedValues)
   at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update()

Pinturiccio
Devart Team
Posts: 2125
Joined: Wed 02 Nov 2011 09:44

Re: Error when inserting double quotes in json type column.

Post by Pinturiccio » Mon 18 Jul 2016 14:25

We have reproduced the issue. We will investigate it and post here about the results as soon as possible.

Pinturiccio
Devart Team
Posts: 2125
Joined: Wed 02 Nov 2011 09:44

Re: Error when inserting double quotes in json type column.

Post by Pinturiccio » Tue 26 Jul 2016 12:12

We have fixed the bug with inserting the "/"" value to a column of the JSON type via a parameter.

New build of dotConnect for PostgreSQL 7.6.699 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/postgr ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to viewtopic.php?t=34003

Trylle
Posts: 3
Joined: Mon 11 Jul 2016 23:22

Re: Error when inserting double quotes in json type column.

Post by Trylle » Fri 29 Jul 2016 09:04

Thanks!

Post Reply