473,225 Members | 1,294 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,225 software developers and data experts.

QMF for Windows and Updateable Views

JC
I created an updateable view, which joins two tables, in a DB2 UDB
database. The view was made updateable by the creation of an "instead
of" trigger. I'd like to use this view for updates via QMF for Windows
or DB2 Table Editor. However, when I try to update from either of
these tools, I receive an SQL0150 error. Is there anything I can do to
allow the updates, such as update the READONLY value for the view in
the catalog table? Thanks.

Feb 20 '06 #1
11 3086
JC wrote:
I created an updateable view, which joins two tables, in a DB2 UDB
database. The view was made updateable by the creation of an "instead
of" trigger. I'd like to use this view for updates via QMF for Windows
or DB2 Table Editor. However, when I try to update from either of
these tools, I receive an SQL0150 error.
The SQL0150 is an error code returned by DB2. This should be unrelated to
the client you are using, i.e. QMF in your case. I would suspect that your
instead of trigger does not work or that you do not have one. Could you
possibly post the DDL statements for the tables, views and the triggers
along with the update or insert statements that raise the error in
question?
Is there anything I can do to
allow the updates, such as update the READONLY value for the view in
the catalog table? Thanks.


You cannot update the db2 catalog tables (views). And that's for good
reasons.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Feb 20 '06 #2
JC
I forgot to mention above that I successfully tested the update via the
view from the DB2 CLP and the DB2 Command Center. I've also been able
to update from QMF for a view over a single table. The error only
occurs for the view over the two tables, when the update is attempted
in QMF.

Feb 20 '06 #3
JC wrote:
I forgot to mention above that I successfully tested the update via the
view from the DB2 CLP and the DB2 Command Center. I've also been able
to update from QMF for a view over a single table. The error only
occurs for the view over the two tables, when the update is attempted
in QMF.

DB2 determines the updatability of a view soley by its' structure.
E.g. a view based on a JOIN is not updatable. The rules are describe )I
think) in teh CREATE VIEW statement. Search for "updatable view"
If you need to update such a "complex" views you can take a look at
INSTEAD OF TRIGGERs. Such a trigger defines a mapping from the view to
the base table (typically the reverse operation from the SELECT).

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Feb 20 '06 #4
JC
Any idea why QMF for Windows and DB2 Table Editor both receive the
SQL0150 error on update via the view, but CLP does not?

Feb 20 '06 #5
JC wrote:
Any idea why QMF for Windows and DB2 Table Editor both receive the
SQL0150 error on update via the view, but CLP does not?

Do these tools have an option to dump the SQLCA?
Would be interesting to see where the message originated (server or client).

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Feb 20 '06 #6
Serge Rielau wrote:
JC wrote:
Any idea why QMF for Windows and DB2 Table Editor both receive the
SQL0150 error on update via the view, but CLP does not?

Do these tools have an option to dump the SQLCA?
Would be interesting to see where the message originated (server or
client).


Maybe QMF uses CLI (I strongly suspect it but don't know for sure). This
could also be used to verify that the exact same query as on the command
line triggers the error message.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Feb 21 '06 #7
Knut Stolze wrote:
Maybe QMF uses CLI (I strongly suspect it but don't know for sure). This
could also be used to verify that the exact same query as on the command
line triggers the error message.


....by collecting a CLI trace.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Feb 21 '06 #8
JC
I took a CLI trace, but don't see any thing in the file.

Feb 21 '06 #9
JC wrote:
I took a CLI trace, but don't see any thing in the file.


You should see the SQL0150 somewhere (assuming that QMF uses only CLI and
nothing else besides it). If not, then the error seems to originate from
another places.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Feb 21 '06 #10
JC
It must not use CLI. I've turned on both CLI and JDBC trace
information, but there is absolutely nothing in the trace files from
QMF. I confirmed the trace was set-up properly by using a different
application (which results in lots of trace data).

Feb 21 '06 #11
JC
I found there is an option to connect via CLI -- which fixed the
problem. Thanks for your help.

Feb 23 '06 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Tom wilson | last post by:
This is driving me nuts. I'm trying to update an Excel spreadsheet using ADO.Net and Oledb in VB.Net. The connection is open, the adapter is connected and the dataset is loaded. Here's the code...
1
by: John | last post by:
I am hoping to create an updatable view from two tables joined on two fields. I have two questions; 1. How can I enforce a one to one relation in sql server 2005 based on two fields? Do I need...
3
by: Paul Aspinall | last post by:
Hi I have an MDI app.... All child MDI windows are non-updateable... however, the users may leave the windows open... and there can be several of them. I want to implement a system to dispose...
3
by: CSN | last post by:
Just wondering, is updateable views slated for a future version of Postgresql? In addition to using rules that is. CSN __________________________________ Do you Yahoo!?
4
by: Sebastian Böck | last post by:
Hello all, i have a view defined as a simple select of a table. This table is inherited by a couple of others. All entries belong to the child-tables. I also have an unconditional update rule...
8
by: Jim in Arizona | last post by:
I've been using an example out of a book to be able to edit the rows in a database. I am getting the following error: ========================================================...
9
by: Reidar | last post by:
Is it possible to have the source in one window and the design in another window and perhaps the code in a third window? reidarT
4
by: othellomy | last post by:
How do I make a view non updateable? I want to create a view so that I will not be able to update, insert or delete the view so that base table is not affected (except dropping the view itself)....
1
by: kia.martin | last post by:
I have a sql database connected with access, but when I try to run macros which basically just transfer information from tables for approval an error comes up with "time key is not updateable". I...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.