Use the escape string syntax...

Use the escape string syntax...

Postby alemstr » Tue 09 Aug 2011 11:38

A problem with using special symbols:

Code: Select all
var names = new List{"\"}
using (var entities = new DataEntities())
{
   var names = entities.Names
      .Where(o => names.Contains(o.Name))
      .ToList()
}


In DbMonitor I see:

Code: Select all
SELECT
"Extent1"."Id" AS "Id",
"Extent1"."Name" AS "Name"
FROM public."Names" AS "Extent1"
WHERE (("Extent1"."Name") = '\)


PostgreSQL write warning in windows logs:

WARNING: nonstandard use of \ in a string literal at character 450
HINT: Use the escape string syntax for backslashes, e.g., E'\.

How to change the code so that PostgreSQL did not write this warning?

Thanks.
alemstr
 
Posts: 3
Joined: Fri 10 Jun 2011 10:16

Postby Shalex » Wed 10 Aug 2011 11:15

Thank you for your report. We will investigate the issue and notify you about the results as soon as possible.
Shalex
Devart Team
 
Posts: 7781
Joined: Thu 14 Aug 2008 12:44

Postby Shalex » Wed 10 Aug 2011 12:40

The bug with escape symbols in the query is fixed. We will post here when the corresponding build of dotConnect for PostgreSQL is available for download (in 2-3 weeks).
Shalex
Devart Team
 
Posts: 7781
Joined: Thu 14 Aug 2008 12:44

Postby Shalex » Wed 07 Sep 2011 11:15

New version of dotConnect for PostgreSQL 5.50 is released!
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): http://secure.devart.com/ .
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=21944 .
Shalex
Devart Team
 
Posts: 7781
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for PostgreSQL