Re: BUG #4322: Problems with field not updatable - Mailing list pgsql-bugs

From Magnus Hagander
Subject Re: BUG #4322: Problems with field not updatable
Date
Msg-id 488DAEAD.60005@hagander.net
Whole thread Raw
In response to BUG #4322: Problems with field not updatable  ("Alexandre Caneo" <alexandre@adtinformatica.com.br>)
Responses RES: BUG #4322: Problems with field not updatable
List pgsql-bugs
Alexandre Caneo wrote:
> The following bug has been logged online:
>
> Bug reference:      4322
> Logged by:          Alexandre Caneo
> Email address:      alexandre@adtinformatica.com.br
> PostgreSQL version: 8.2.6
> Operating system:   WIN XP
> Description:        Problems with field not updatable
> Details:
>
> I'm using Win XP SP2, VB6 and PostgreSql 8.2.6.
>
> When I select the datas with this instruction
> "select a.x from a,b where a.z = b.z order by 1"
> the program run very well and I can insert, update and delete rows. But,
> when I select any column from table b an error occurs when I try to modify
> the column value from textbox for an example.
> "Binding Collection Error. field not updatable".
>
> String connection
>     ls_StrConn = "PROVIDER=MSDASQL.1; DRIVER={PostgreSQL UNICODE};
> DATABASE=" & ls_Conexao & "; SERVER=" & ls_Host & "; PORT=" & ls_Servico &
> "; UID=" & ls_login & "; PWD=" & ls_Senha & "; ByteaAsLongVarBinary=1;"
>
> Recordset's properties
>   mo_Record.CursorType = adOpenDynamic
>   mo_Record.LockType = adLockOptimistic
>
>   mo_Record.Open mo_Command
>
> One more thing.
> I don't need update the table's b column, just show them.

If you don't need updating, you should open your cursor as either
adOpenStatic or adOpenForwardOnly. Using adOpenDynamic explicitly
requests the ability to do updates/inserts/deletes through the cursor.

//Magnus

pgsql-bugs by date:

Previous
From: "Gerd Grossmann"
Date:
Subject: BUG #4329: Transaction model changed?
Next
From: "Alexandre Caneo"
Date:
Subject: RES: BUG #4322: Problems with field not updatable