Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pRcMN-00024k-1L for pgsql-odbc@arkaria.postgresql.org; Mon, 13 Feb 2023 17:11:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pRcML-00078M-Rr for pgsql-odbc@arkaria.postgresql.org; Mon, 13 Feb 2023 17:11:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pRcML-00078D-IH for pgsql-odbc@lists.postgresql.org; Mon, 13 Feb 2023 17:11:21 +0000 Received: from mail-yb1-xb2b.google.com ([2607:f8b0:4864:20::b2b]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pRcMI-00042p-Vx for pgsql-odbc@lists.postgresql.org; Mon, 13 Feb 2023 17:11:20 +0000 Received: by mail-yb1-xb2b.google.com with SMTP id u76so1464305ybi.7 for ; Mon, 13 Feb 2023 09:11:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=H2Vn2tLePFy/e88oIe1HXFZUBLSZlkLDNtlyQjdSTOw=; b=UhcG4AEzia2Nzprqmi6esFpNSfykEDRfWc/yrRPGSmvET3UdTzfhpVx5sC1KyJJGum 2Aur6i7FfWPmAhrzZ0DwKy4uaOowZNNo44qW7SSg1M54J9n2c2q0UX2Dw2Ia+24/dJaV 8RihyAJ+y/hTv8xhEc6GSNPlicVUABYdgu9k5LvAe4nTqYnM0BtbsjVrp2wHwtLTe4QU K3Vu+jz8jVDp+sMF8N1TXgyGYvW5dBsNxmAbT8DVW8k8BXmGCi0J+DDeEYlzYTpw/N/E UlXzSlpeULPXAb7y/rAy3Rv6bzMjAUoVoXA8Nj+h0Hv0bMvMB35cF2UOovg2Da9qWc+c pvKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=H2Vn2tLePFy/e88oIe1HXFZUBLSZlkLDNtlyQjdSTOw=; b=psR1CFbFr8IIZpWVpJbxST7PgvtC+8GX88kqgTOVw5/jRSDUlQgDZtLBVzAVc1MGDd KYmOjnC75nWtOqblq6b6oS9xu0xN5qKEt07HPydiS+zuOHkeVAJN+avRa6VsZ3/ktEW6 o5//+/cJKPjqAgZ73NXf2vWDQMOF/A7TPMfBe/Y0dhkqTg2ARfDG8qz5z0mvqPud9VyX jRXsy7MPCBdIrPM/4gnhZGn5PltzOqTmzGsmnaPv1y6nkD3GkFSNd0++jD8L2s7YHtuY jhFfBwYc3aVxxtxGaGYiJa5uCCZlRU34K4Tj6OisajSrIh3nUNwmcic2YAg4C73iESQ0 A/dA== X-Gm-Message-State: AO0yUKVwtXemfSVWNxNKIBTBMtTpQRxzXb6m/jnTt+naavXnnO9nPi92 /GsBfFRnXscQsdFhbqpZdkz8+SP4TlFNovYwzlXzG2OT X-Google-Smtp-Source: AK7set9aoEBuTSW6G0IsrNbH+1LLR20uNMMb6zyyw9HqCIChgmwJp3Kb0hXl4nGtcSHcU81gxNXdXtbBeJwvnIeVegk= X-Received: by 2002:a5b:6d0:0:b0:869:f97a:9978 with SMTP id r16-20020a5b06d0000000b00869f97a9978mr2706733ybq.476.1676308276490; Mon, 13 Feb 2023 09:11:16 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Brad White Date: Mon, 13 Feb 2023 11:11:05 -0600 Message-ID: Subject: Fwd: Quoting issue from ODBC To: pgsql-odbc@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000005ac1ce05f497ef2d" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000005ac1ce05f497ef2d Content-Type: text/plain; charset="UTF-8" Front end: Access 365 Back end: Postgres 9.4 (I know, we are in the process of upgrading) ODBC Driver: PostgreSQL Unicode v13.02, PSQLODBC35W, 9/22/2021 I'm getting some cases where the SQL sent from MS-Access is failing. Looking at the postgres log shows that the field names and table names are not being quoted properly. Only on UPDATE statements. It has been my experience that Access usually does a better job at converting the queries than I would have expected, but not in this instance. For example Access: connection.Execute "UPDATE [" & strTable & "] SET [" & strTable & "] *.[InsertFlag]* = Null" _ & " WHERE ((([" & strTable & "].*[InsertFlag]*)=" & lngCurrUID & "));", , adCmdText Or adExecuteNoRecords Note that InsertFlag is bracketed the same way in both instances. PSQL log: UPDATE "public"."Orders" SET *InsertFlag*=NULL WHERE ( *"InsertFlag"* = 166 ) Note that InsertFlag is quoted once but not the other time. Of course this gives the error: column "insertflag" of relation "Orders" does not exist at character 35. Looks like I have about 16 unique instances of statements not being quoted correctly resulting in over 500 errors in the log for today. This is not a new issue. The logs have these errors stretching back months. Any suggestions on where to look? Thanks, Brad. --0000000000005ac1ce05f497ef2d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Front= end: Access 365
Back end: Postgres 9.4
(I know, we are in the proces= s of upgrading)
ODBC Driver: PostgreSQL Unicode v13.02, PSQLO= DBC35W, 9/22/2021

I'm getting some cases where= the SQL sent from MS-Access is failing.
Looking at the postgres = log shows that the field names and table names are not being quoted properl= y.
Only on UPDATE statements.
It has been my experience= that Access usually does a better job at converting the queries than I wou= ld have expected, but not in this instance.

For ex= ample

Access:=C2=A0connection.Execute "UPDATE= [" & strTable & "] SET [" & strTable & &quo= t;].[InsertFlag] =3D Null" _
=C2=A0 =C2=A0 & " WH= ERE ((([" & strTable & "].[InsertFlag])=3D" &= amp; lngCurrUID & "));", , adCmdText Or adExecuteNoRecordsNote that InsertFlag is bracketed the same way in both instances.
PSQL log:=C2=A0UPDATE "public"."Orders" SET I= nsertFlag=3DNULL =C2=A0WHERE ("InsertFlag" =3D 166 )
Note that InsertFlag is quoted once but not the other time.
<= div>Of course this gives the error: column "insertflag" of relati= on "Orders" does not exist at character 35.

L= ooks like I have=C2=A0about 16 unique instances of statements not being quo= ted correctly resulting=C2=A0in over 500 errors in the log for today.
=

This is not a new issue. The lo= gs have these errors stretching back months.

Any suggestions on where to look?

Thanks,<= br>Brad.
--0000000000005ac1ce05f497ef2d--