RST.Addnew in combination with Limit 1.

Поиск
Список
Период
Сортировка
От Vellinga, Fred
Тема RST.Addnew in combination with Limit 1.
Дата
Msg-id DB8373C85B90D71191350008C784C739574988@ms-ams-exch02.nl.mcilink.com
обсуждение исходный текст
Список pgsql-novice

Hi,

I want to use the ADODB object model to do updates etc. I use MSaccess as frontend, but I guess it will fail on any frontend that supports ADODB.

However the following code does not do the update.

Set RST = New ADODB.Recordset
RST.Open "SELECT FldPtr FROM TblTown LIMIT 1;", CNN, adOpenKeyset, adLockOptimistic, adCmdText
RST.AddNew
RST.Fields("FldPtr").Value = 1
RST.Update

The following does however the work:

Set RST = New ADODB.Recordset
RST.Open "SELECT FldPtr FROM TblTown;", CNN, adOpenKeyset, adLockOptimistic, adCmdText
RST.AddNew
RST.Fields("FldPtr").Value = 1
RST.Update

Is this a bug in the LIMIT operator? The advantage of LIMIT 1 is that only one record in sent over the wire. The code fails at the moment the RST.update statement is called.

Anyway, I am new to PostgreSQL, but the ADODB works very fine with PostgreSQL.
 
Thanks,
Fred

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

Предыдущее
От: Giovanni Mattamira
Дата:
Сообщение: Name of server SSL key and certificate in version 7.4
Следующее
От: "Matt Lynch"
Дата:
Сообщение: LWLockAcquire