Re: A Small psql Suggestion

Поиск
Список
Период
Сортировка
От Brad White
Тема Re: A Small psql Suggestion
Дата
Msg-id CAA_1=91r28Tr8cCXO-t=+hMSPXFvey0CSgLezfZVn851KjgcCw@mail.gmail.com
обсуждение исходный текст
Ответ на A Small psql Suggestion  (Raymond Brinzer <ray.brinzer@gmail.com>)
Ответы Re: A Small psql Suggestion  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
Front end: Access 365
Back end: Postgres 9.4
(I know, we are in the process of upgrading)

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.
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: 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 "Order Items" does not exist at character 35

Any suggestions on where to look?

Thanks,
Brad.

В списке pgsql-general по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: How do a user-defined function that returns a table executes a query?
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: A Small psql Suggestion