[Openroad-users] Need help with strange problem usingQueryObject
Collins, William - ES/EW
William.Collins at itt.com
Tue Jun 26 03:55:57 EST 2007
Thanks Bodo and Sean!
I followed all three suggestions and now it works. Right after I sent
the original message it happened to occur to me that I might have
something to do with setting isrepeated to TRUE (slap forehead). I also
somehow missed that SQLSelect is a subclass of DataStream, and I even
have one of the nice System Class wall posters!
________________________________
From: openroad-users-bounces at peerlessit.com
[mailto:openroad-users-bounces at peerlessit.com] On Behalf Of Bodo
Bergmann
Sent: Monday, June 25, 2007 1:35 PM
To: International OpenROAD Users
Subject: Re: [Openroad-users] Need help with strange problem
usingQueryObject
According to information of DataStream class in the OpenROAD Language
Reference Manual:
-------------------------
Open Method
...
Note: If you set the isrepeated parameter to TRUE or the querymode
parameter to QY_CURSOR, you must also assign a name to the SQLSelect
attribute, QueryName.
QueryName Attribute
Data Type: varchar(32)
4GL Access: RW
The QueryName attribute specifies the name used by the server for
cursors and repeat queries. If the DataStream's QueryMode is QY_CURSOR,
or the isrepeated parameter is set to TRUE during a database operation,
then this attribute is mandatory. To guarantee that a repeat query does
not use stale values still cached in the database server, the value of
this attribute should be changed whenever the query object is modified.
Hope this helps,
Bodo.
Bodo Bergmann
Senior Software Engineer
OpenROAD Worldwide Development
Ingres Corp.
________________________________
From: openroad-users-bounces at peerlessit.com
[mailto:openroad-users-bounces at peerlessit.com] On Behalf Of Sean Thrower
Sent: Monday, June 25, 2007 1:33 PM
To: International OpenROAD Users
Subject: Re: [Openroad-users] Need help with strange problem
usingQueryObject
Bill,
QO_DIRECT is not intended to be used (don't ask) - use QO_CACHE instead.
Believe the message, set the queryname! (there's QO.Name, and there's
QO.QueryName). If it makes the queryobject feel better, it's worth it.
Let me know if it is still being wilful.
Regards,
Sean.
________________________________
From: openroad-users-bounces at peerlessit.com
[mailto:openroad-users-bounces at peerlessit.com] On Behalf Of Collins,
William - ES/EW
Sent: Monday, June 25, 2007 7:20 PM
To: International OpenROAD Users
Subject: [Openroad-users] Need help with strange problem using
QueryObject
I create a QueryObject and populate the Tables and Columns arrays.
Then I open the query:
qo_Object.Open( QueryMode = QO_DIRECT,
Scope = CurFrame.Scope,
CheckCols = TRUE);
This works fine, with no error. Then I Fetch each row:
qo_Object.NextRow();
qo_Object.Load();
All of this works fine, I've checked it in the debugger.
Then I calculate a new value for one of the columns and attempt to
update the table:
qo_Object.DBUpdate(zerorowsiserror = FALSE,
isrepeated = TRUE,
maxrows = 1);
This gives these errors in the Trace Window:
E_WT0029 Error at line nnn of frame_name.
E_OM00B3 Error in DBUpdate method on queryobject.
E_OM00AE Query name has not been provided.
I have not found documentation anywhere that talks about providing a
Query name. Can anyone point me in the right direction?
TIA,
Bill Collins,
Software Engineering Consultant,
President, OpenROAD Users International
*****************************************************************
This e-mail and any files transmitted with it may be proprietary
and are intended solely for the use of the individual or entity to
whom they are addressed. If you have received this e-mail in
error please notify the sender. Please note that any views or
opinions presented in this e-mail are solely those of the author
and do not necessarily represent those of ITT Corporation. The
recipient should check this e-mail and any attachments for the
presence of viruses. ITT accepts no liability for any damage
caused by any virus transmitted by this e-mail.
*******************************************************************
*****************************************************************
This e-mail and any files transmitted with it may be proprietary
and are intended solely for the use of the individual or entity to
whom they are addressed. If you have received this e-mail in
error please notify the sender. Please note that any views or
opinions presented in this e-mail are solely those of the author
and do not necessarily represent those of ITT Corporation. The
recipient should check this e-mail and any attachments for the
presence of viruses. ITT accepts no liability for any damage
caused by any virus transmitted by this e-mail.
*******************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.peerlessit.com/pipermail/openroad-users/attachments/20070625/35e46189/attachment.html
More information about the Openroad-users
mailing list