Page 1 of 1

Error when inserting double quotes in json type column.

Posted: Mon 11 Jul 2016 23:37
by Trylle
Error when inserting double quotes in json type column.

error code: 22P02
invalid input syntax for type json

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

Posted: Thu 14 Jul 2016 14:05
by Pinturiccio
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.

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

Posted: Fri 15 Jul 2016 00:28
by Trylle
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()

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

Posted: Mon 18 Jul 2016 14:25
by Pinturiccio
We have reproduced the issue. We will investigate it and post here about the results as soon as possible.

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

Posted: Tue 26 Jul 2016 12:12
by Pinturiccio
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

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

Posted: Fri 29 Jul 2016 09:04
by Trylle
Thanks!