You are here: Re: HELP! reading syscat from php in db2 udb v8.1.9 Linux « PHP SQL « IT news, forums, messages
Re: HELP! reading syscat from php in db2 udb v8.1.9 Linux

Posted by Bob Stearns on 03/19/06 22:20

Serge Rielau wrote:
> Bob Stearns wrote:
>
>> I am trying to write a small app in php to make the 'COMMENT'
>> statement a bit more friendly, so we might do more documentation. My
>> problem is a set of error statements which have nothing to do with
>> what I'm doing. For instance when I try to run the trigger list with
>> the code below, I get the error message:
>>
>> 42832--[IBM][CLI Driver][DB2/LINUX] SQL0607N "UPDATE" is not defined
>> for system objects. SQLSTATE=42832
>>
>> $sql = "SELECT trigname AS obj_name
>> FROM syscat.triggers
>> WHERE trigschema='$db_schema'
>> ";
>> dosql($sql, "S OBJ", -1, "", $res, $n);
>>
>> I get different, but similar, error messages when I try tables and views:
>>
>> 42808--[IBM][CLI Driver][DB2/LINUX] SQL0151N The column
>> "MAXFREESPACESEARCH" cannot be updated. SQLSTATE=42808
>>
>> 42808--[IBM][CLI Driver][DB2/LINUX] SQL0151N The column "SEQNO" cannot
>> be updated. SQLSTATE=42808
>>
>> When I run the statements in my frontend, ADS, they all do just what I
>> expect. Since I don't know where the problem lies, I posted this
>> question to two newsgroups.
>
> Appears your client attached a FOR UPDATE clause.
> Try this:
> SELECT trigname AS obj_name
> FROM syscat.triggers
> WHERE trigschema='$db_schema'
> FOR READ ONLY
>
>
Thank you, again, for helping a learner. Does the 'FOR READ ONLY' clause
speed up things in general? Should I include whenever I am only
interested in reading the results? My php version, if it is important,
is 4.4.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация