BUG #4322: Problems with field not updatable

Started by Alexandre Caneoover 17 years ago5 messagesbugs
Jump to latest
#1Alexandre Caneo
alexandre@adtinformatica.com.br

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.

Any suggestions would be appreciated.
Best regards.
Alexandre.

#2Craig Ringer
craig@2ndquadrant.com
In reply to: Alexandre Caneo (#1)
Re: BUG #4322: Problems with field not updatable

Alexandre Caneo wrote:

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

Maybe you should try your query from psql, and see if it works fine
there. If it does, then you know the problem is in your data access
driver or application.

At a guess, I'd say you'll be having issues with data type support in
the data access driver. You are using a prehistoric programming
language, which won't be helping.

You should post your query (if it's generated by your app at runtime,
get it by enabling query logging in the database and fishing it out of
the PostgreSQL log) and the schema definition of the problem table as
obtained with psql's \d command.

--
Craig Ringer

#3Magnus Hagander
magnus@hagander.net
In reply to: Alexandre Caneo (#1)
Re: BUG #4322: Problems with field not updatable

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

#4Alexandre Caneo
alexandre@adtinformatica.com.br
In reply to: Magnus Hagander (#3)
RES: BUG #4322: Problems with field not updatable

Magnus,

I've tried open cursor with adOpenStatic or adOpenForwardOnly, but it didn't work.

Do you have others suggestions?

Tks.
Alexandre.

-----Mensagem original-----
De: Magnus Hagander [mailto:magnus@hagander.net]
Enviada em: segunda-feira, 28 de julho de 2008 08:34
Para: Alexandre Caneo
Cc: pgsql-bugs@postgresql.org
Assunto: Re: [BUGS] BUG #4322: Problems with field not updatable

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

No virus found in this incoming message.
Checked by AVG.
Version: 7.5.441 / Virus Database: 270.5.6/1523 - Release Date: 25/7/2008 00:00

No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.441 / Virus Database: 270.5.6/1523 - Release Date: 25/7/2008 00:00

#5Magnus Hagander
magnus@hagander.net
In reply to: Alexandre Caneo (#4)
Re: RES: BUG #4322: Problems with field not updatable

Can't say that I do. I think you need to get the ODBC folks to look at
it, the problem appears to be there rather than in the server product.

//Magnus

Alexandre Caneo wrote:

Show quoted text

Magnus,

I've tried open cursor with adOpenStatic or adOpenForwardOnly, but it didn't work.

Do you have others suggestions?

Tks.
Alexandre.

-----Mensagem original-----
De: Magnus Hagander [mailto:magnus@hagander.net]
Enviada em: segunda-feira, 28 de julho de 2008 08:34
Para: Alexandre Caneo
Cc: pgsql-bugs@postgresql.org
Assunto: Re: [BUGS] BUG #4322: Problems with field not updatable

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

No virus found in this incoming message.
Checked by AVG.
Version: 7.5.441 / Virus Database: 270.5.6/1523 - Release Date: 25/7/2008 00:00

No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.441 / Virus Database: 270.5.6/1523 - Release Date: 25/7/2008 00:00