dbTalk Databases Forums  

Error editing a grid based on a View

comp.databases.oracle.tools comp.databases.oracle.tools


Discuss Error editing a grid based on a View in the comp.databases.oracle.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
nick048
 
Posts: n/a

Default Error editing a grid based on a View - 11-02-2007 , 12:56 AM






Hi to All,

First, I use Oracle DB 10g and Forms Builder 10.

This is my "scenario":

1) I have create a Form with an header with the Text Items
CURRENT_YEAR, FROM_DATE, TO_DATE and a Button Item "Execute", and with
a Grid.
2) The button populate according with selections the grid with data
from an Oracle view that point to a remote non-oracle DB (SQL Server).
For the connection I have used Oracle heterogeneous services.
3) All work fine; the grid is correctly filled.

The problem is the editing of grid; if I try to modify a field in a
row of grid, this error is displayed:

FRM-40501: ORACLE error: unable to reserve record for update or delete

I have searched on the web, without appreciable result.

I need to edit the row, because I want create with each modified row a
new record in a different table of my Oracle DB.

Can someone help me ?

Best Regards.
Gaetano


Reply With Quote
  #2  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: Error editing a grid based on a View - 11-02-2007 , 01:56 PM






nick048 wrote:
Quote:
Hi to All,

First, I use Oracle DB 10g and Forms Builder 10.

This is my "scenario":

1) I have create a Form with an header with the Text Items
CURRENT_YEAR, FROM_DATE, TO_DATE and a Button Item "Execute", and with
a Grid.
2) The button populate according with selections the grid with data
from an Oracle view that point to a remote non-oracle DB (SQL Server).
For the connection I have used Oracle heterogeneous services.
3) All work fine; the grid is correctly filled.

The problem is the editing of grid; if I try to modify a field in a
row of grid, this error is displayed:

FRM-40501: ORACLE error: unable to reserve record for update or delete

I have searched on the web, without appreciable result.

I need to edit the row, because I want create with each modified row a
new record in a different table of my Oracle DB.

Can someone help me ?

Best Regards.
Gaetano

Oracle Forms does not "understand" it cannot lock the record, as
it is from SQL Server - try defining the grid block, based on
a procedure.

Something else strikes as odd: blocks based on views should
not be updateable (unless insetad-of triggers are used),
as views cannot be updated. You are sure you want your gird
updateable?
--
Regards,
Frank van Bortel

Top-posting is one way to shut me up...


Reply With Quote
  #3  
Old   
Shakespeare
 
Posts: n/a

Default Re: Error editing a grid based on a View - 11-05-2007 , 09:49 AM




"Frank van Bortel" <frank.van.bortel (AT) gmail (DOT) com> schreef in bericht
news:fgfvcj$1ko$1 (AT) news5 (DOT) zwoll1.ov.home.nl...
Quote:
nick048 wrote:
Hi to All,

First, I use Oracle DB 10g and Forms Builder 10.

This is my "scenario":

1) I have create a Form with an header with the Text Items
CURRENT_YEAR, FROM_DATE, TO_DATE and a Button Item "Execute", and with
a Grid.
2) The button populate according with selections the grid with data
from an Oracle view that point to a remote non-oracle DB (SQL Server).
For the connection I have used Oracle heterogeneous services.
3) All work fine; the grid is correctly filled.

The problem is the editing of grid; if I try to modify a field in a
row of grid, this error is displayed:

FRM-40501: ORACLE error: unable to reserve record for update or delete

I have searched on the web, without appreciable result.

I need to edit the row, because I want create with each modified row a
new record in a different table of my Oracle DB.

Can someone help me ?

Best Regards.
Gaetano

Oracle Forms does not "understand" it cannot lock the record, as
it is from SQL Server - try defining the grid block, based on
a procedure.

Something else strikes as odd: blocks based on views should
not be updateable (unless insetad-of triggers are used),
as views cannot be updated. You are sure you want your gird
updateable?
--
Regards,
Frank van Bortel

Top-posting is one way to shut me up...
If this is a single table view, you may have to include the rowid of the
underlying table (though I don' t know anything about SQL server, does it
have one?) I used Heterogenous Services with DB2 and we had to use a
rowid-like column in the select. In that case it HAD to be the first column.
But it's a loooong time ago, back in '96 or so....
@Frank: in Forms single table views can be updated, as long as one provides
a 'fake' primary key (being the prim key of the table).

Shakespeare




Reply With Quote
  #4  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: Error editing a grid based on a View - 11-05-2007 , 01:00 PM



Shakespeare wrote:
Quote:
But it's a loooong time ago, back in '96 or so....
@Frank: in Forms single table views can be updated, as long as one provides
a 'fake' primary key (being the prim key of the table).

OK - thanks for the update - must be a new feature since I last
used it.
Nevertheless - it's a view, ultimately coming from SS - I doubt
if that's ever going to work. My 2c are on procedures - TSQL
can probably do it.

--
Regards,
Frank van Bortel

Top-posting is one way to shut me up...


Reply With Quote
  #5  
Old   
Shakespeare
 
Posts: n/a

Default Re: Error editing a grid based on a View - 11-05-2007 , 02:31 PM




"Frank van Bortel" <frank.van.bortel (AT) gmail (DOT) com> schreef in bericht
news:fgnp8a$ga6$1 (AT) news5 (DOT) zwoll1.ov.home.nl...
Quote:
Shakespeare wrote:
But it's a loooong time ago, back in '96 or so....
@Frank: in Forms single table views can be updated, as long as one
provides
a 'fake' primary key (being the prim key of the table).


OK - thanks for the update - must be a new feature since I last
used it.
Nevertheless - it's a view, ultimately coming from SS - I doubt
if that's ever going to work. My 2c are on procedures - TSQL
can probably do it.

--
Regards,
Frank van Bortel

Top-posting is one way to shut me up...
Frank,

Guess you're right about SqlSurfer. For an update over HS or Transparant
Gateways, a view may not work. A synonym for the table on the other side
might, but I don't think Forms will recognize it. Procedures will be the
right choice.

Shakepeare.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.