public inbox for [email protected]  
help / color / mirror / Atom feed
From: Brad White <[email protected]>
To: [email protected]
Subject: Fwd: Quoting issue from ODBC
Date: Mon, 13 Feb 2023 11:11:05 -0600
Message-ID: <CAA_1=93AMh3OOoU-TCZ3xOyVYywUaSb67LFNDRMbEa9OikKZGQ@mail.gmail.com> (raw)
In-Reply-To: <CAA_1=93z4oEXKQ9GHtDkEQhEe5r39C8YSDMpwO8OHmSBreXw3g@mail.gmail.com>
References: <CAA_1=93z4oEXKQ9GHtDkEQhEe5r39C8YSDMpwO8OHmSBreXw3g@mail.gmail.com>

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.


view thread (14+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Fwd: Quoting issue from ODBC
  In-Reply-To: <CAA_1=93AMh3OOoU-TCZ3xOyVYywUaSb67LFNDRMbEa9OikKZGQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox