Re: Quoting issue from ODBC - Mailing list pgsql-general

From David G. Johnston
Subject Re: Quoting issue from ODBC
Date
Msg-id CAKFQuwZv0ZtOa+NiZP1E+C-B+EPQCieZ-UJtcReXWUETrOsqSA@mail.gmail.com
Whole thread Raw
In response to Fwd: Quoting issue from ODBC  (Brad White <b55white@gmail.com>)
Responses Re: Quoting issue from ODBC  (Rob Sargent <robjsargent@gmail.com>)
List pgsql-general
On Tue, Feb 7, 2023 at 5:20 PM Brad White <b55white@gmail.com> wrote:
For example, this is the literal code in VBA

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: 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.


Either VBA is doing some query munging or that concatenated string isn't the one that is producing the error.  Which suggests that maybe you have a string somewhere that is not written correctly that need to be fixed so it doesn't produce this error.

David J.

pgsql-general by date:

Previous
From: Brad White
Date:
Subject: Fwd: Quoting issue from ODBC
Next
From: Rob Sargent
Date:
Subject: Re: Quoting issue from ODBC